mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
f3a84eab91
The previous behaviour, courtesy of the [] operator in std::map, would uncritically store a new ContractDefinition in m_contracts even when a ContractDefinition already existed. This "resolved" collissions on contract names by clobbering the original one with the new one, and could lead to scenarios where the clobber would only be discovered when the original ContractDefinition could not be found or referred to, which was an unhelpful InternalCompilerError. This change checks the m_contracts map for a collision first and will not let the ContractDefinition be changed to a new one once it's set, throwing a CompilerError with information about the conflict. |
||
---|---|---|
.. | ||
CompilerStack.cpp | ||
CompilerStack.h | ||
Exceptions.cpp | ||
Exceptions.h | ||
GasEstimator.cpp | ||
GasEstimator.h | ||
InterfaceHandler.cpp | ||
InterfaceHandler.h | ||
SourceReferenceFormatter.cpp | ||
SourceReferenceFormatter.h | ||
Utils.h | ||
Version.cpp | ||
Version.h |