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

12 lines
402 B
Solidity

contract C {
function f() public payable {
abi.encode(this.f{value: 2});
abi.encode(this.f{gas: 2});
abi.encode(this.f{value: 2, gas: 1});
}
}
// ----
// TypeError 2056: (60-76='this.f{value: 2}'): This type cannot be encoded.
// TypeError 2056: (92-106='this.f{gas: 2}'): This type cannot be encoded.
// TypeError 2056: (122-146='this.f{value: 2, gas: 1}'): This type cannot be encoded.