diff options
author | chriseth <chris@ethereum.org> | 2018-04-27 21:44:41 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-16 09:52:24 +0800 |
commit | c781baf7336af55abc33e1b63e6fc99a7e555d78 (patch) | |
tree | 1bab29687eaa45b50e6f241a9bac9de8a8018fe7 /test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationComplex.sol | |
parent | 67d208d144a179e52e1aab3fbd1bd67fe20176b7 (diff) | |
download | dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.tar.gz dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.tar.zst dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.zip |
Add tests for multi variable declaration statement.
Diffstat (limited to 'test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationComplex.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationComplex.sol | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationComplex.sol b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationComplex.sol new file mode 100644 index 00000000..a3ce6a74 --- /dev/null +++ b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationComplex.sol @@ -0,0 +1,11 @@ +contract D { + struct S { uint a; uint b; } +} +contract C { + function f() internal returns (uint, uint, uint, D.S[20] storage, uint) { + (,,,D.S[10*2] storage x,) = f(); + x; + } +} +// ---- +// Warning: (110-117): This variable is of storage pointer type and might be returned without assignment. This can cause storage corruption. Assign the variable (potentially from itself) to remove this warning. |