aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-01-18 16:23:21 +0800
committerchriseth <c@ethdev.com>2016-01-18 16:23:21 +0800
commit2c5d045729f375ba386083dfd305f186d6d8577a (patch)
tree6479be15b7dac20801d4f268b6b264d4b62a96c1 /test
parentcc4b4f507784d67a7f53c5cbaee5a99fc6fe9e2d (diff)
parent9613a94153c834432688577e9cfdb2328eeae691 (diff)
downloaddexon-solidity-2c5d045729f375ba386083dfd305f186d6d8577a.tar
dexon-solidity-2c5d045729f375ba386083dfd305f186d6d8577a.tar.gz
dexon-solidity-2c5d045729f375ba386083dfd305f186d6d8577a.tar.bz2
dexon-solidity-2c5d045729f375ba386083dfd305f186d6d8577a.tar.lz
dexon-solidity-2c5d045729f375ba386083dfd305f186d6d8577a.tar.xz
dexon-solidity-2c5d045729f375ba386083dfd305f186d6d8577a.tar.zst
dexon-solidity-2c5d045729f375ba386083dfd305f186d6d8577a.zip
Merge pull request #359 from LianaHus/sol_only_one_array_as_state_var
fixed ICError when creating EI for structs containing only mapping or arrays
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 4697e756..7e030c7f 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -1003,6 +1003,17 @@ 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"