Fixes source location in warning for shadowing import delcarations.

This commit is contained in:
Christian Parpart
2019-09-30 11:45:46 +02:00
parent 8847647547
commit 00d7dac15f
9 changed files with 32 additions and 20 deletions
@@ -5,4 +5,4 @@ library A {}
==== Source: c ====
import {A} from "./a"; import {A} from "./b";
// ----
// DeclarationError: (c:23-45): Identifier already declared.
// DeclarationError: (c:31-32): Identifier already declared.
@@ -3,4 +3,4 @@ contract C {}
==== Source: b ====
import {C as msg} from "B.sol";
// ----
// Warning: (B.sol:0-13): This declaration shadows a builtin symbol.
// Warning: (b:13-16): This declaration shadows a builtin symbol.
@@ -7,5 +7,5 @@ contract C {
// ----
// Warning: (B.sol:0-15): This declaration shadows a builtin symbol.
// Warning: (B.sol:16-32): This declaration shadows a builtin symbol.
// Warning: (B.sol:0-15): This declaration shadows a builtin symbol.
// Warning: (B.sol:16-32): This declaration shadows a builtin symbol.
// Warning: (b:8-11): This declaration shadows a builtin symbol.
// Warning: (b:13-18): This declaration shadows a builtin symbol.
@@ -5,4 +5,4 @@ library A {}
==== Source: c ====
import {A} from "./a"; import {A} from "./b";
// ----
// DeclarationError: (c:23-45): Identifier already declared.
// DeclarationError: (c:31-32): Identifier already declared.