solidity/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol

12 lines
385 B
Solidity
Raw Normal View History

2018-05-04 14:20:38 +00:00
contract C {
function f() public pure returns (uint, uint, bytes32) {
uint a;
bytes32 b;
(a,) = f();
(,b) = f();
}
}
// ----
2018-08-06 10:42:39 +00:00
// TypeError: (103-106): Type tuple(uint256,uint256,bytes32) is not implicitly convertible to expected type tuple(uint256,).
// TypeError: (117-120): Type tuple(uint256,uint256,bytes32) is not implicitly convertible to expected type tuple(,bytes32).