mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11881 from ethereum/unsuable-symbol-11855
Properly export symbols from aliased imports.
This commit is contained in:
commit
9c2ab1ff2f
@ -14,6 +14,7 @@ Compiler Features:
|
|||||||
|
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
* Name Resolver: Fix that when importing an aliased symbol using ``import {AliasedName} from "a.sol"`` it would use the original name of the symbol and not the aliased one.
|
||||||
* SMTChecker: Fix false negative caused by ``push`` on storage array references returned by internal functions.
|
* SMTChecker: Fix false negative caused by ``push`` on storage array references returned by internal functions.
|
||||||
* SMTChecker: Fix false positive in external calls from constructors.
|
* SMTChecker: Fix false positive in external calls from constructors.
|
||||||
* SMTChecker: Fix internal error on some multi-source uses of ``abi.*``, cryptographic functions and constants.
|
* SMTChecker: Fix internal error on some multi-source uses of ``abi.*``, cryptographic functions and constants.
|
||||||
|
@ -102,7 +102,12 @@ bool NameAndTypeResolver::performImports(SourceUnit& _sourceUnit, map<string, So
|
|||||||
else
|
else
|
||||||
for (Declaration const* declaration: declarations)
|
for (Declaration const* declaration: declarations)
|
||||||
if (!DeclarationRegistrationHelper::registerDeclaration(
|
if (!DeclarationRegistrationHelper::registerDeclaration(
|
||||||
target, *declaration, alias.alias.get(), &alias.location, false, m_errorReporter
|
target,
|
||||||
|
*declaration,
|
||||||
|
alias.alias ? alias.alias.get() : &alias.symbol->name(),
|
||||||
|
&alias.location,
|
||||||
|
false,
|
||||||
|
m_errorReporter
|
||||||
))
|
))
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
==== Source: dummy ====
|
||||||
|
contract Dummy { string public constant FOO = "FOO"; }
|
||||||
|
==== Source: hasAlias ====
|
||||||
|
import {Dummy as AliasedDummy} from "dummy";
|
||||||
|
==== Source: Main ====
|
||||||
|
import {AliasedDummy} from "hasAlias";
|
||||||
|
contract TestAlias is AliasedDummy {}
|
||||||
|
// ----
|
Loading…
Reference in New Issue
Block a user