36 lines
1.5 KiB
Markdown
36 lines
1.5 KiB
Markdown
[basic.scope.contract]
|
||
|
||
# 6 Basics [[basic]](./#basic)
|
||
|
||
## 6.4 Scope [[basic.scope]](basic.scope#contract)
|
||
|
||
### 6.4.10 Contract-assertion scope [basic.scope.contract]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L1593)
|
||
|
||
Each contract assertion ([[basic.contract]](basic.contract "6.11 Contract assertions"))C introduces a [*contract-assertion scope*](#def:scope,contract-assertion "6.4.10 Contract-assertion scope [basic.scope.contract]") that includes C[.](#1.sentence-1)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L1598)
|
||
|
||
If a [*result-name-introducer*](dcl.contract.res#nt:result-name-introducer "9.4.2 Referring to the result object [dcl.contract.res]") ([[dcl.contract.res]](dcl.contract.res "9.4.2 Referring to the result object"))
|
||
that is not name-independent ([[basic.scope.scope]](basic.scope.scope "6.4.1 General"))
|
||
and whose enclosing postcondition assertion
|
||
is associated with a function F potentially conflicts with
|
||
a declaration whose target scope is
|
||
|
||
- [(2.1)](#2.1)
|
||
|
||
the function parameter scope of F or
|
||
|
||
- [(2.2)](#2.2)
|
||
|
||
if associated with a [*lambda-declarator*](expr.prim.lambda.general#nt:lambda-declarator "7.5.6.1 General [expr.prim.lambda.general]"),
|
||
the nearest enclosing lambda scope
|
||
of the precondition assertion ([[expr.prim.lambda]](expr.prim.lambda "7.5.6 Lambda expressions")),
|
||
|
||
the program is ill-formed[.](#2.sentence-1)
|