mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
When diagnosing a duplicate name, point to the name instead of the instruction (#4953)
Left TODOs where more work is necessary before this change can be applied or its impact can be verified. Includes #4952, to avoid regression in some cases. Similar to #4938. See https://discord.com/channels/655572317891461132/655578254970716160/1339007384361762857.
This commit is contained in:
+2
-2
@@ -111,9 +111,9 @@ alias B = A;
|
||||
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+8]]:4: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: fn B() {}
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6: in import [InImport]
|
||||
// CHECK:STDERR: def_alias.carbon:5:7: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: alias B = A;
|
||||
|
||||
Reference in New Issue
Block a user