aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol')
-rw-r--r--test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol
index be0347de..fa524b99 100644
--- a/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol
+++ b/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol
@@ -1,11 +1,14 @@
contract C {
function f() public {
- require(address(this).delegatecall());
- require(address(this).delegatecall(uint(1)));
- require(address(this).delegatecall(uint(1), uint(2)));
+ (bool success,) = address(this).delegatecall();
+ require(success);
+ (success,) = address(this).delegatecall(uint(1));
+ require(success);
+ (success,) = address(this).delegatecall(uint(1), uint(2));
+ require(success);
}
}
// ----
-// TypeError: (55-83): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata.
-// TypeError: (129-136): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it.
-// TypeError: (156-200): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it.
+// TypeError: (65-93): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata.
+// TypeError: (169-176): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it.
+// TypeError: (226-270): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it.