aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorRhett Aultman <roadriverrail@gmail.com>2016-11-18 23:37:15 +0800
committerRhett Aultman <rhett.aultman@meraki.net>2017-01-17 01:32:57 +0800
commitf3a84eab91a6f05cfe58e260f206f9af51811313 (patch)
treee10cd4452c9bded66869ee8b7975f67ce23343a4 /docs
parent79e5772b8a18bc4a7a1fd1019604cec6f741b743 (diff)
downloaddexon-solidity-f3a84eab91a6f05cfe58e260f206f9af51811313.tar.gz
dexon-solidity-f3a84eab91a6f05cfe58e260f206f9af51811313.tar.zst
dexon-solidity-f3a84eab91a6f05cfe58e260f206f9af51811313.zip
Error out when contracts collide on name
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.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions