@@ -38,6 +38,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
38
38
- [ Reference binding produces a value that wraps a pointer] ( #reference-binding-produces-a-value-that-wraps-a-pointer )
39
39
- [ Separate interface for compile-time binding instead of type binding] ( #separate-interface-for-compile-time-binding-instead-of-type-binding )
40
40
- [ Allow ` extend api ` of an incomplete type] ( #allow-extend-api-of-an-incomplete-type )
41
+ - [ Make some name resolutions cases unambiguous with ` extend api ` ] ( #make-some-name-resolutions-cases-unambiguous-with-extend-api )
41
42
42
43
<!-- tocstop -->
43
44
@@ -262,22 +263,24 @@ How does this arise?
262
263
> [ member_access.md] ( /docs/design/expressions/member_access.md ) says that
263
264
> ` v.(C.Static) ` and ` r.(C.Static) ` are both invalid, because they don't perform
264
265
> member name lookup, instance binding, nor impl lookup -- the ` v. ` and ` r. `
265
- > portions are redundant. That rule is now a best-effort diagnostic and should
266
- > not trigger as the result of rewrites performed by the compiler or when the
267
- > problem is not contained in a single expression. For example, it would be
268
- > reasonable for the compiler to allow:
266
+ > portions are redundant. That rule is removed by this proposal.
267
+ >
268
+ > Instead, tools such as linters can option such code as suspicious on a
269
+ > best-effort basis, particularly when the issue is contained in a single
270
+ > expression. Such tools may still allow code that performs the same operation
271
+ > across multiple statements, as in:
269
272
>
270
273
> ``` carbon
271
274
> let M:! auto = C.Static
272
275
> v.(M)();
273
276
> r.(M)();
274
277
> ```
275
278
>
276
- > Note that with overloaded names, the `M` might be an instance member in some
279
+ > Note that if `M` is an overloaded name, it could be an instance member in some
277
280
> cases and a non-instance member in others, depending on the arguments passed.
278
- > Since the call happens after binding, this gives another reason to consider
279
- > this a best-effort error on a whole expression, rather than a strict rule just
280
- > about binding.
281
+ > This is another reason to delegate this to linters on a best-effort error
282
+ > basis analyzing a whole expression, rather than a strict rule just about
283
+ > binding.
281
284
282
285
The binding operators are defined using three dedicated interfaces:
283
286
@@ -1266,3 +1269,8 @@ This was discussed in the
1266
1269
[ proposal review] ( https://github.com/carbon-language/carbon-lang/pull/3720/files#r1507988547 )
1267
1270
and
1268
1271
[ the #typesystem channel on Discord] ( https://discord.com/channels/655572317891461132/708431657849585705/1217499991329738852 ) .
1272
+
1273
+ ### Make some name resolutions cases unambiguous with ` extend api `
1274
+
1275
+ TODO: See
1276
+ [ comment on #3720 ] ( https://github.com/carbon-language/carbon-lang/pull/3720/files#r1513671030 )
0 commit comments