diff options
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() } |