diff options
author | LianaHus <liana@ethdev.com> | 2016-01-16 00:36:06 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2016-01-16 00:36:06 +0800 |
commit | b2daa5a9d818f80df0c12e0afedb9ff549bd63d8 (patch) | |
tree | 0bbb6dd41eb7bb0716d24c728b4de617b159e36e /test | |
parent | ca45cfee8c3a1013a174b3fe499e7361c5f6d3d8 (diff) | |
download | dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.tar.gz dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.tar.zst dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.zip |
fixed assert on EI creation for structs containing only mapping or arrays
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 4697e756..1b19f234 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -1003,6 +1003,19 @@ BOOST_AUTO_TEST_CASE(base_class_state_variable_accessor) BOOST_CHECK(success(text)); } +BOOST_AUTO_TEST_CASE(struct_accessor_one_array_only) +{ + char const* sourceCode = R"( + contract test { + + struct Data { uint[15] m_array; } + Data public data; + } + )"; + BOOST_CHECK(expectError(sourceCode) == Error::Type::TypeError); +} + + BOOST_AUTO_TEST_CASE(base_class_state_variable_internal_member) { char const* text = "contract Parent {\n" |