From 7343c4028365d3fbc9fa46fca6078971a2bed426 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 21 Mar 2018 19:07:15 +0100 Subject: Check partial function parameters if rest is arbitrary. --- .../arbitrary_parameters_but_restricted_first_type.sol | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/libsolidity/syntaxTests/functionCalls/arbitrary_parameters_but_restricted_first_type.sol (limited to 'test/libsolidity/syntaxTests/functionCalls') diff --git a/test/libsolidity/syntaxTests/functionCalls/arbitrary_parameters_but_restricted_first_type.sol b/test/libsolidity/syntaxTests/functionCalls/arbitrary_parameters_but_restricted_first_type.sol new file mode 100644 index 00000000..94da5881 --- /dev/null +++ b/test/libsolidity/syntaxTests/functionCalls/arbitrary_parameters_but_restricted_first_type.sol @@ -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. -- cgit