solidity/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol

15 lines
512 B
Solidity
Raw Normal View History

contract C {
2018-07-04 16:35:01 +00:00
function f() internal pure returns (uint, uint, uint, uint) {
(uint a, uint b,,) = f();
a; b;
}
2018-07-04 16:35:01 +00:00
function g() internal pure {
(bytes memory a, string storage b) = h();
a; b;
}
2018-07-04 16:35:01 +00:00
function h() internal pure returns (bytes memory, string storage s) { s = s; }
}
// ----
2021-06-04 08:59:03 +00:00
// Warning 5740: (111-115): Unreachable code.
// Warning 6321: (250-262): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.