diff options
author | Christian <c@ethdev.com> | 2015-01-14 17:16:58 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-14 17:16:58 +0800 |
commit | 212a0c52516950af1a5b14cfc0855ad9ec897e5a (patch) | |
tree | 8aabf161381d387dc03f0e1e6b0a8361ec454981 | |
parent | b85ae53f63b845eb872e15aed56fccf3a5d39153 (diff) | |
download | dexon-solidity-212a0c52516950af1a5b14cfc0855ad9ec897e5a.tar.gz dexon-solidity-212a0c52516950af1a5b14cfc0855ad9ec897e5a.tar.zst dexon-solidity-212a0c52516950af1a5b14cfc0855ad9ec897e5a.zip |
Check for hash collisions already before compiling.
-rw-r--r-- | SolidityNameAndTypeResolution.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index 94271b1f..e2b4f160 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -357,6 +357,18 @@ BOOST_AUTO_TEST_CASE(function_canonical_signature_type_aliases) } } + +BOOST_AUTO_TEST_CASE(hash_collision_in_interface) +{ + char const* text = "contract test {\n" + " function gsf() {\n" + " }\n" + " function tgeo() {\n" + " }\n" + "}\n"; + BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); +} + BOOST_AUTO_TEST_SUITE_END() } |