aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-14 17:16:58 +0800
committerChristian <c@ethdev.com>2015-01-14 17:16:58 +0800
commit212a0c52516950af1a5b14cfc0855ad9ec897e5a (patch)
tree8aabf161381d387dc03f0e1e6b0a8361ec454981
parentb85ae53f63b845eb872e15aed56fccf3a5d39153 (diff)
downloaddexon-solidity-212a0c52516950af1a5b14cfc0855ad9ec897e5a.tar.gz
dexon-solidity-212a0c52516950af1a5b14cfc0855ad9ec897e5a.tar.zst
dexon-solidity-212a0c52516950af1a5b14cfc0855ad9ec897e5a.zip
Check for hash collisions already before compiling.
-rw-r--r--SolidityNameAndTypeResolution.cpp12
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()
}