aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-10-16 20:34:43 +0800
committerchriseth <c@ethdev.com>2015-10-16 20:36:30 +0800
commitead0478f268f486ea8e9eccac729c93cf4a94ee1 (patch)
tree6e8eda5685a5da25143b59adc2e49e265f2dc983 /test/libsolidity/SolidityEndToEndTest.cpp
parent52eaa477d4bd9ad2f591148727d1ac9fd500d283 (diff)
downloaddexon-solidity-ead0478f268f486ea8e9eccac729c93cf4a94ee1.tar
dexon-solidity-ead0478f268f486ea8e9eccac729c93cf4a94ee1.tar.gz
dexon-solidity-ead0478f268f486ea8e9eccac729c93cf4a94ee1.tar.bz2
dexon-solidity-ead0478f268f486ea8e9eccac729c93cf4a94ee1.tar.lz
dexon-solidity-ead0478f268f486ea8e9eccac729c93cf4a94ee1.tar.xz
dexon-solidity-ead0478f268f486ea8e9eccac729c93cf4a94ee1.tar.zst
dexon-solidity-ead0478f268f486ea8e9eccac729c93cf4a94ee1.zip
Fix errors when struct array type is used on its own.
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 75e43b73..27c511f2 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -5772,6 +5772,21 @@ BOOST_AUTO_TEST_CASE(destructuring_assignment_wildcard)
BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(0)));
}
+BOOST_AUTO_TEST_CASE(lone_struct_array_type)
+{
+ char const* sourceCode = R"(
+ contract C {
+ struct s { uint a; uint b;}
+ function f() returns (uint) {
+ s[7][]; // This is only the type, should not have any effect
+ return 3;
+ }
+ }
+ )";
+ compileAndRun(sourceCode);
+ BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(3)));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}