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
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -174,6 +174,14 @@ class C;
174
174
// Can't write a final impl in both the interface's file and the root self
175
175
// type's file (when they are different files).
176
176
//
177
+
// 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]
178
+
// CHECK:STDERR: final impl C as Z(()) {}
179
+
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
180
+
// CHECK:STDERR: fail_final_impl_with_both_interface_and_self_but_different_files.carbon:[[@LINE-10]]:1: in import [InImport]
181
+
// CHECK:STDERR: interface_z_with_impl.carbon:7:1: note: imported `final impl` here [FinalImplOverlapsDifferentFileNote]
182
+
// 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
187
195
// can't write a final impl in two different files.
188
196
//
197
+
// CHECK:STDERR: fail_final_overlaps_final_from_other_file.carbon:[[@LINE+8]]:1: error: `final impl` overlaps with `final impl` from another file [FinalImplOverlapsDifferentFile]
198
+
// CHECK:STDERR: final impl C as Z(C) {}
199
+
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
200
+
// CHECK:STDERR: fail_final_overlaps_final_from_other_file.carbon:[[@LINE-10]]:1: in import [InImport]
201
+
// CHECK:STDERR: interface_z_with_impl.carbon:7:1: note: imported `final impl` here [FinalImplOverlapsDifferentFileNote]
202
+
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
0 commit comments