Check partial function parameters if rest is arbitrary.

This commit is contained in:
chriseth
2018-04-12 00:10:25 +02:00
parent c4a6a63f36
commit 7343c40283
2 changed files with 27 additions and 3 deletions
@@ -0,0 +1,13 @@
contract C {
function f() pure public {
abi.encodeWithSelector();
abi.encodeWithSignature();
abi.encodeWithSelector(uint(2), 2);
abi.encodeWithSignature(uint(2), 2);
}
}
// ----
// TypeError: (52-76): Need at least 1 arguments for function call, but provided only 0.
// TypeError: (86-111): Need at least 1 arguments for function call, but provided only 0.
// TypeError: (144-151): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes4 requested.
// TypeError: (189-196): Invalid type for argument in function call. Invalid implicit conversion from uint256 to string memory requested.