mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
When diagnosing a duplicated name, add the name to the diagnosis (#4902)
In order to have the name available for diagnostics, we now always set `NameId` in `NameContext` and put `poisoning_loc_id` as part of the union with `resolved_inst_id` instead (since we never need both).
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ alias B = A;
|
||||
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+8]]:4: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+8]]:4: error: duplicate name `B` being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: fn B() {}
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6: in import [InImport]
|
||||
|
||||
Reference in New Issue
Block a user