mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add return data to bare calls.
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
contract C {
|
||||
function f() public {
|
||||
require(address(this).callcode());
|
||||
require(address(this).callcode(uint(1)));
|
||||
require(address(this).callcode(uint(1), uint(2)));
|
||||
(bool success,) = address(this).callcode();
|
||||
require(success);
|
||||
(success,) = address(this).callcode(uint(1));
|
||||
require(success);
|
||||
(success,) = address(this).callcode(uint(1), uint(2));
|
||||
require(success);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (55-79): 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: (121-128): 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: (148-188): 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-89): 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: (161-168): 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: (218-258): 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.
|
||||
|
||||
Reference in New Issue
Block a user