solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/248_tuple_assignment_from_void_function.sol

12 lines
360 B
Solidity
Raw Normal View History

contract C {
function f() public { }
function g() public {
var (x,) = (f(), f());
}
}
// ----
// Warning: (80-81): Use of the "var" keyword is deprecated.
// Warning: (87-90): Tuple component cannot be empty.
// Warning: (92-95): Tuple component cannot be empty.
// TypeError: (80-81): Cannot declare variable with void (empty tuple) type.