solidity/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol
2022-04-01 23:41:18 -05:00

12 lines
407 B
Solidity

contract C {
function f() public pure returns (uint, uint, bytes32) {
uint a;
bytes32 b;
(a,) = f();
(,b) = f();
}
}
// ----
// TypeError 7407: (103-106='f()'): Type tuple(uint256,uint256,bytes32) is not implicitly convertible to expected type tuple(uint256,).
// TypeError 7407: (117-120='f()'): Type tuple(uint256,uint256,bytes32) is not implicitly convertible to expected type tuple(,bytes32).