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

10 lines
448 B
Solidity

contract C {
function f(int a, int b) public {}
function failFunctionArgsIntLiteralNestedTuple() public returns(bytes memory) {
return abi.encodeCall(this.f, ((1,2)));
}
}
// ----
// TypeError 7788: (139-170='abi.encodeCall(this.f, ((1,2)))'): Expected 2 instead of 1 components for the tuple parameter.
// TypeError 5407: (163-168='(1,2)'): Cannot implicitly convert component at position 0 from "tuple(int_const 1,int_const 2)" to "int256".