diff options
author | chriseth <chris@ethereum.org> | 2018-07-10 21:24:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-10 21:24:01 +0800 |
commit | 7650905567a0e6740b09e1d540d037152c0cac85 (patch) | |
tree | 558cb37564789644115242dd6e0e07d032d436da /test/libsolidity/SolidityEndToEndTest.cpp | |
parent | d9c3b10b1c5ad5d9dffbaceb48cd99e7293a6c56 (diff) | |
parent | 65631cffc2127fc603371c67f85d2c07da07c3ca (diff) | |
download | dexon-solidity-7650905567a0e6740b09e1d540d037152c0cac85.tar.gz dexon-solidity-7650905567a0e6740b09e1d540d037152c0cac85.tar.zst dexon-solidity-7650905567a0e6740b09e1d540d037152c0cac85.zip |
Merge pull request #4415 from ethereum/uninitializedStoragePointer
[BREAKING] Turn uninitialized storage variables into error.
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index ce00931b..fbc6a9c6 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -7878,6 +7878,7 @@ BOOST_AUTO_TEST_CASE(tuples) char const* sourceCode = R"( contract C { uint[] data; + uint[] m_c; function g() internal returns (uint a, uint b, uint[] storage c) { return (1, 2, data); } @@ -7890,7 +7891,7 @@ BOOST_AUTO_TEST_CASE(tuples) uint a; uint b; (a, b) = this.h(); if (a != 5 || b != 6) return 1; - uint[] storage c; + uint[] storage c = m_c; (a, b, c) = g(); if (a != 1 || b != 2 || c[0] != 3) return 2; (a, b) = (b, a); @@ -9585,7 +9586,7 @@ BOOST_AUTO_TEST_CASE(calling_uninitialized_function_through_array) { assembly { mstore(0, 7) return(0, 0x20) } } mutex = 1; // Avoid re-executing this function if we jump somewhere. - function() internal returns (uint)[200] x; + function() internal returns (uint)[200] memory x; x[0](); return 2; } @@ -10113,7 +10114,7 @@ BOOST_AUTO_TEST_CASE(copy_internal_function_array_to_storage) function() internal returns (uint)[20] x; int mutex; function one() public returns (uint) { - function() internal returns (uint)[20] xmem; + function() internal returns (uint)[20] memory xmem; x = xmem; return 3; } |