aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-10-16 21:20:44 +0800
committerchriseth <c@ethdev.com>2015-10-16 21:20:44 +0800
commit452d4732937f418d9c0b5152050c13aa48b7fdde (patch)
tree1299ef98d48c98f630f1a3828929075fc3ea48fe /test
parent102114176ce175e7cb937016ed30a45c8dc720d6 (diff)
parentead0478f268f486ea8e9eccac729c93cf4a94ee1 (diff)
downloaddexon-solidity-452d4732937f418d9c0b5152050c13aa48b7fdde.tar
dexon-solidity-452d4732937f418d9c0b5152050c13aa48b7fdde.tar.gz
dexon-solidity-452d4732937f418d9c0b5152050c13aa48b7fdde.tar.bz2
dexon-solidity-452d4732937f418d9c0b5152050c13aa48b7fdde.tar.lz
dexon-solidity-452d4732937f418d9c0b5152050c13aa48b7fdde.tar.xz
dexon-solidity-452d4732937f418d9c0b5152050c13aa48b7fdde.tar.zst
dexon-solidity-452d4732937f418d9c0b5152050c13aa48b7fdde.zip
Merge pull request #143 from chriseth/loneStructArray
Fix errors when struct array type is used on its own.
Diffstat (limited to 'test')
-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()
}