diff options
author | chriseth <c@ethdev.com> | 2015-02-06 19:08:24 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-02-06 19:08:24 +0800 |
commit | 366284d37c555b2dfbbd8b8cf37a943660e5b69c (patch) | |
tree | c29bedc22e8a514a452a5a027e610df20ef282a6 | |
parent | 3d98ea22663ef87cffc032f6bf921039e959c293 (diff) | |
parent | bd41622341b7dd4acbe7dcbf56b77bbcd751bc2f (diff) | |
download | dexon-solidity-366284d37c555b2dfbbd8b8cf37a943660e5b69c.tar.gz dexon-solidity-366284d37c555b2dfbbd8b8cf37a943660e5b69c.tar.zst dexon-solidity-366284d37c555b2dfbbd8b8cf37a943660e5b69c.zip |
Merge pull request #963 from guanqun/disallow-void-var
Disallow implicit declaration of void type.
-rw-r--r-- | SolidityNameAndTypeResolution.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index ae6c374b..742d2ee2 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -904,6 +904,12 @@ BOOST_AUTO_TEST_CASE(invalid_parameter_names_in_named_args) BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError); } +BOOST_AUTO_TEST_CASE(disallow_declaration_of_void_type) +{ + char const* sourceCode = "contract c { function f() { var x = f(); } }"; + BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError); +} + BOOST_AUTO_TEST_SUITE_END() } |