aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2016-01-16 00:36:06 +0800
committerLianaHus <liana@ethdev.com>2016-01-16 00:36:06 +0800
commitb2daa5a9d818f80df0c12e0afedb9ff549bd63d8 (patch)
tree0bbb6dd41eb7bb0716d24c728b4de617b159e36e /test
parentca45cfee8c3a1013a174b3fe499e7361c5f6d3d8 (diff)
downloaddexon-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.cpp13
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"