We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The as import keyword used in import "./file.sol" as name creates names considered distinct from other imports of the same file under the same name.
as
import "./file.sol" as name
They should be unified when they wrap the exact same file.
solc 0.8.28
// imported.sol contract C {} // file1.sol import "./imported.sol" as Imported; // file2.sol import "./imported.sol" as Imported; // toplevel.sol import "./file0.sol"; import "./file1.sol"; // Compilation fails with `Identifier already declared`.
Contrast the above with the 2 examples below, which both work:
// imported.sol contract C {} // file1.sol import {C} from "./imported.sol"; // file2.sol import {C} from "./imported.sol"; // toplevel.sol import "./file0.sol"; import "./file1.sol"; // Compilation succeeds.
and
// imported.sol contract C {} // file1.sol import {C as D} from "./imported.sol"; // file2.sol import {C as D} from "./imported.sol"; // toplevel.sol import "./file0.sol"; import "./file1.sol"; // Compilation succeeds.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The
as
import keyword used inimport "./file.sol" as name
creates names considered distinct from other imports of the same file under the same name.They should be unified when they wrap the exact same file.
Environment
solc 0.8.28
Steps to Reproduce
Contrast the above with the 2 examples below, which both work:
and
The text was updated successfully, but these errors were encountered: