solidity/test/libsolidity/syntaxTests/types/empty_tuple_lvalue.sol

14 lines
413 B
Solidity
Raw Normal View History

pragma solidity ^0.4.3;
contract C {
function f() private pure {}
function a() public {
uint x;
uint y;
(x, y) = (f(), f());
}
}
// ----
2018-07-10 10:36:48 +00:00
// TypeError: (146-149): Tuple component cannot be empty.
// TypeError: (151-154): Tuple component cannot be empty.
// TypeError: (145-155): Type tuple(tuple(),tuple()) is not implicitly convertible to expected type tuple(uint256,uint256).