diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-02-26 22:42:21 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-02-26 22:42:21 +0800 |
commit | 206d646dbfabd6cb8edea6c68d04d2bc32eb8cf9 (patch) | |
tree | e27256e3b1fc13375666e5b34248afa66d771351 /SolidityNameAndTypeResolution.cpp | |
parent | c5b2733d1e405487b0b3d419b22a08883ac487dd (diff) | |
parent | 60ade5b33f004d64b4f55b5efc2f7083724d9682 (diff) | |
download | dexon-solidity-206d646dbfabd6cb8edea6c68d04d2bc32eb8cf9.tar.gz dexon-solidity-206d646dbfabd6cb8edea6c68d04d2bc32eb8cf9.tar.zst dexon-solidity-206d646dbfabd6cb8edea6c68d04d2bc32eb8cf9.zip |
Merge remote-tracking branch 'upstream/develop' into memTests
Diffstat (limited to 'SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | SolidityNameAndTypeResolution.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index df970a6e..4809aac1 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -1176,6 +1176,15 @@ BOOST_AUTO_TEST_CASE(test_for_bug_override_function_with_bytearray_type) BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(sourceCode)); } +BOOST_AUTO_TEST_CASE(array_with_nonconstant_length) +{ + char const* text = R"( + contract c { + function f(uint a) { uint8[a] x; } + })"; + BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); +} + BOOST_AUTO_TEST_SUITE_END() } |