Skip to content

Commit cb85ed0

Browse files
committed
typo
1 parent d0f8f7c commit cb85ed0

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

toolchain/check/testdata/facet/access.carbon

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,14 @@ fn F(U:! I where .X = .Self) {
210210
// member lookup, but can't call methods without `self`. See the
211211
// `compound_access_through_call_with_self_param.carbon` test for the former.
212212
//
213-
// CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+4]]:6: error: value of type `<associated entity in I>` is not callable [CallToNonCallable]
214-
// CHECK:STDERR: u.(I.G());
215-
// CHECK:STDERR: ^~~~~
213+
// CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `U` into type implementing `I` [ConversionFailureNonTypeToFacet]
214+
// CHECK:STDERR: u.(I.G)();
215+
// CHECK:STDERR: ^~~~~~~
216+
// CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+4]]:3: note: type `U` does not implement interface `Core.ImplicitAs(I)` [MissingImplInMemberAccessNote]
217+
// CHECK:STDERR: u.(I.G)();
218+
// CHECK:STDERR: ^~~~~~~
216219
// CHECK:STDERR:
217-
u.(I.G());
220+
u.(I.G)();
218221

219222
// This is the same as the above, since G() returns a non-type value of type
220223
// `U`.
@@ -251,25 +254,15 @@ fn F(U:! I where .X = .Self) {
251254
// `u` is a non-type value. Can call methods with `self` through compound
252255
// member lookup, but can't call methods without `self`. See the
253256
// `compound_access_through_call.carbon` test for the latter.
254-
// CHECK:STDERR: fail_todo_compound_access_through_call_with_self_param.carbon:[[@LINE+4]]:6: error: member name `G2` not found in `I` [MemberNameNotFoundInInstScope]
255-
// CHECK:STDERR: u.(I.G2());
256-
// CHECK:STDERR: ^~~~
257-
// CHECK:STDERR:
258-
u.(I.G2());
257+
u.(I.G)();
259258

260259
// This is the same as the above, since G() returns a non-type value of type
261-
// `U`.
262-
//
263-
// This works because G2 has a `self` parameter.
264-
// CHECK:STDERR: fail_todo_compound_access_through_call_with_self_param.carbon:[[@LINE+8]]:3: error: cannot access member of interface `I` in type `I where .(I.X) = .Self` that does not implement that interface [MissingImplInMemberAccess]
265-
// CHECK:STDERR: U.(I.G)().(I.G2)();
260+
// `U`. This works because G has a `self` parameter.
261+
// CHECK:STDERR: fail_todo_compound_access_through_call_with_self_param.carbon:[[@LINE+4]]:3: error: cannot access member of interface `I` in type `I where .(I.X) = .Self` that does not implement that interface [MissingImplInMemberAccess]
262+
// CHECK:STDERR: U.(I.G)().(I.G)();
266263
// CHECK:STDERR: ^~~~~~~
267264
// CHECK:STDERR:
268-
// CHECK:STDERR: fail_todo_compound_access_through_call_with_self_param.carbon:[[@LINE+4]]:14: error: member name `G2` not found in `I` [MemberNameNotFoundInInstScope]
269-
// CHECK:STDERR: U.(I.G)().(I.G2)();
270-
// CHECK:STDERR: ^~~~
271-
// CHECK:STDERR:
272-
U.(I.G)().(I.G2)();
265+
U.(I.G)().(I.G)();
273266
}
274267

275268
// --- fail_non_const_associated.carbon

0 commit comments

Comments
 (0)