Files
2025-10-25 03:02:53 +03:00

36 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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.11Contract assertions"))C introduces a [*contract-assertion scope*](#def:scope,contract-assertion "6.4.10Contract-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.2Referring to the result object[dcl.contract.res]") ([[dcl.contract.res]](dcl.contract.res "9.4.2Referring to the result object"))
that is not name-independent ([[basic.scope.scope]](basic.scope.scope "6.4.1General"))
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.1General[expr.prim.lambda.general]"),
the nearest enclosing lambda scope
of the precondition assertion ([[expr.prim.lambda]](expr.prim.lambda "7.5.6Lambda expressions")),
the program is ill-formed[.](#2.sentence-1)