mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Correctly name builtin functions in error messages.
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
"typeDescriptions":
|
||||
{
|
||||
"typeIdentifier": "t_function_error_pure$__$returns$__$",
|
||||
"typeString": "function () pure"
|
||||
"typeString": "error ()"
|
||||
}
|
||||
},
|
||||
"id": 6,
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6359: (82-94): Return argument type function () pure returns (bytes memory) is not implicitly convertible to expected type (type of first return variable) bytes memory.
|
||||
// TypeError 6359: (82-94): Return argument type concat() pure returns (bytes memory) is not implicitly convertible to expected type (type of first return variable) bytes memory.
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ contract C {
|
||||
// TypeError 9553: (415-428): Invalid type for argument in function call. Invalid implicit conversion from function () view external returns (uint256) to function () pure external returns (uint256) requested.
|
||||
// TypeError 9553: (465-481): Invalid type for argument in function call. Invalid implicit conversion from function () external returns (uint256) to function () pure external returns (uint256) requested.
|
||||
// TypeError 9553: (518-545): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) pure external returns (uint256) to function () pure external returns (uint256) requested.
|
||||
// TypeError 9553: (582-589): Invalid type for argument in function call. Invalid implicit conversion from function () view returns (uint256) to function () pure external returns (uint256) requested. Special functions can not be converted to function types.
|
||||
// TypeError 9553: (582-589): Invalid type for argument in function call. Invalid implicit conversion from gasleft() view returns (uint256) to function () pure external returns (uint256) requested. Special functions can not be converted to function types.
|
||||
// TypeError 9553: (626-629): Invalid type for argument in function call. Invalid implicit conversion from function () pure returns (uint256) to function () pure external returns (uint256) requested. Special functions can not be converted to function types.
|
||||
// TypeError 9553: (666-686): Invalid type for argument in function call. Invalid implicit conversion from function () pure returns (uint256) to function () pure external returns (uint256) requested. Special functions can not be converted to function types.
|
||||
// TypeError 9582: (723-748): Member "testInternalFunction" not found or not visible after argument-dependent lookup in contract C.
|
||||
|
||||
@@ -9,4 +9,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9582: (133-136): Member "f" not found or not visible after argument-dependent lookup in function (uint256) pure.
|
||||
// TypeError 9582: (133-136): Member "f" not found or not visible after argument-dependent lookup in error E(uint256).
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
function() internal pure x = E;
|
||||
}
|
||||
// ----
|
||||
// TypeError 7407: (58-59): Type function () pure is not implicitly convertible to expected type function () pure. Special functions can not be converted to function types.
|
||||
// TypeError 7407: (58-59): Type error E() is not implicitly convertible to expected type function () pure. Special functions can not be converted to function types.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9574: (42-103): Type function (uint256) view returns (bytes32) is not implicitly convertible to expected type function (uint256) view returns (bytes32). Special functions can not be converted to function types.
|
||||
// TypeError 9574: (42-103): Type blockhash(uint256) view returns (bytes32) is not implicitly convertible to expected type function (uint256) view returns (bytes32). Special functions can not be converted to function types.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
event That(uint a);
|
||||
function f() public {
|
||||
function (uint) pure g = That;
|
||||
emit That(2);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9574: (71-100): Type event That(uint256) is not implicitly convertible to expected type function (uint256) pure. Special functions can not be converted to function types.
|
||||
+1
-1
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9582: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes32).
|
||||
// TypeError 9582: (47-60): Member "gas" not found or not visible after argument-dependent lookup in keccak256(bytes memory) pure returns (bytes32).
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9582: (47-57): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes32).
|
||||
// TypeError 9582: (47-57): Member "gas" not found or not visible after argument-dependent lookup in sha256(bytes memory) pure returns (bytes32).
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9582: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes20).
|
||||
// TypeError 9582: (47-60): Member "gas" not found or not visible after argument-dependent lookup in ripemd160(bytes memory) pure returns (bytes20).
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9582: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes32,uint8,bytes32,bytes32) pure returns (address).
|
||||
// TypeError 9582: (47-60): Member "gas" not found or not visible after argument-dependent lookup in ecrecover(bytes32,uint8,bytes32,bytes32) pure returns (address).
|
||||
|
||||
@@ -4,5 +4,5 @@ function test() pure {
|
||||
function (int) returns (MyInt) g = MyInt.wrap;
|
||||
}
|
||||
// ----
|
||||
// TypeError 9574: (46-93): Type function (MyInt) pure returns (int256) is not implicitly convertible to expected type function (MyInt) returns (int256). Special functions can not be converted to function types.
|
||||
// TypeError 9574: (99-144): Type function (int256) pure returns (MyInt) is not implicitly convertible to expected type function (int256) returns (MyInt). Special functions can not be converted to function types.
|
||||
// TypeError 9574: (46-93): Type unwrap(MyInt) pure returns (int256) is not implicitly convertible to expected type function (MyInt) returns (int256). Special functions can not be converted to function types.
|
||||
// TypeError 9574: (99-144): Type wrap(int256) pure returns (MyInt) is not implicitly convertible to expected type function (int256) returns (MyInt). Special functions can not be converted to function types.
|
||||
|
||||
Reference in New Issue
Block a user