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/impl/lookup/impl_overlap.carbon
+2-24Lines changed: 2 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ interface Z(T:! type) {}
22
22
// --- interface_z_with_impl.carbon
23
23
library "[[@TEST_NAME]]";
24
24
25
+
interfaceOther(T:!type) {}
26
+
25
27
interfaceZ(T:!type) {}
26
28
27
29
final impl forall [T:!type] T asZ(T) {}
@@ -172,14 +174,6 @@ class C;
172
174
// Can't write a final impl in both the interface's file and the root self
173
175
// type's file (when they are different files).
174
176
//
175
-
// CHECK:STDERR: fail_final_impl_with_both_interface_and_self_but_different_files.carbon:[[@LINE+8]]:1: error: `final impl` overlaps with `final impl` from another file [FinalImplOverlapsDifferentFile]
176
-
// CHECK:STDERR: final impl C as Z(()) {}
177
-
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
178
-
// CHECK:STDERR: fail_final_impl_with_both_interface_and_self_but_different_files.carbon:[[@LINE-10]]:1: in import [InImport]
179
-
// CHECK:STDERR: interface_z_with_impl.carbon:5:1: note: imported `final impl` here [FinalImplOverlapsDifferentFileNote]
180
-
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
// This final impl is overlapped by a final impl in the interface file, and you
193
187
// can't write a final impl in two different files.
194
188
//
195
-
// CHECK:STDERR: fail_final_overlaps_final_from_other_file.carbon:[[@LINE+8]]:1: error: `final impl` overlaps with `final impl` from another file [FinalImplOverlapsDifferentFile]
196
-
// CHECK:STDERR: final impl C as Z(C) {}
197
-
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
198
-
// CHECK:STDERR: fail_final_overlaps_final_from_other_file.carbon:[[@LINE-10]]:1: in import [InImport]
199
-
// CHECK:STDERR: interface_z_with_impl.carbon:5:1: note: imported `final impl` here [FinalImplOverlapsDifferentFileNote]
200
-
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
0 commit comments