You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: toolchain/check/testdata/facet/access.carbon
+11-16Lines changed: 11 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -210,11 +210,14 @@ fn F(U:! I where .X = .Self) {
210
210
// member lookup, but can't call methods without `self`. See the
211
211
// `compound_access_through_call_with_self_param.carbon` test for the former.
212
212
//
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: ^~~~~~~
216
219
// CHECK:STDERR:
217
-
u.(I.G());
220
+
u.(I.G)();
218
221
219
222
// This is the same as the above, since G() returns a non-type value of type
220
223
// `U`.
@@ -251,25 +254,17 @@ fn F(U:! I where .X = .Self) {
251
254
// `u` is a non-type value. Can call methods with `self` through compound
252
255
// member lookup, but can't call methods without `self`. See the
253
256
// `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)();
259
258
260
259
// This is the same as the above, since G() returns a non-type value of type
261
260
// `U`.
262
261
//
263
262
// 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)();
263
+
// 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]
264
+
// CHECK:STDERR: U.(I.G)().(I.G)();
266
265
// CHECK:STDERR: ^~~~~~~
267
266
// 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]
0 commit comments