From c781baf7336af55abc33e1b63e6fc99a7e555d78 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 27 Apr 2018 15:44:41 +0200 Subject: Add tests for multi variable declaration statement. --- .../multiVariableDeclarationSimple.sol | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol (limited to 'test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol') diff --git a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol new file mode 100644 index 00000000..8e06322c --- /dev/null +++ b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol @@ -0,0 +1,12 @@ +contract C { + function f() internal returns (uint, uint, uint, uint) { + (uint a, uint b,,) = f(); + a; b; + } + function g() internal returns (bytes memory, string storage) { + (bytes memory a, string storage b) = g(); + a; b; + } +} +// ---- +// Warning: (163-169): 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. -- cgit v1.2.3