mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix abi.encodeCall checks
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
error E(uint);
|
||||
|
||||
function f() {
|
||||
abi.encodeCall(E, (1));
|
||||
}
|
||||
// ----
|
||||
// TypeError 3509: (50-51): Expected regular external function type, or external view on public function. Cannot use errors for abi.encodeCall.
|
||||
@@ -0,0 +1,9 @@
|
||||
library L {
|
||||
event E(uint);
|
||||
}
|
||||
|
||||
function f() {
|
||||
abi.encodeCall(L.E, (1));
|
||||
}
|
||||
// ----
|
||||
// TypeError 3509: (68-71): Expected regular external function type, or external view on public function. Cannot use events for abi.encodeCall.
|
||||
@@ -0,0 +1,7 @@
|
||||
function g(uint) {}
|
||||
|
||||
function f() {
|
||||
abi.encodeCall(g, (1));
|
||||
}
|
||||
// ----
|
||||
// TypeError 3509: (55-56): Expected regular external function type, or external view on public function. Provided internal function.
|
||||
@@ -0,0 +1,9 @@
|
||||
library L {
|
||||
function g() external {}
|
||||
}
|
||||
|
||||
function f() {
|
||||
abi.encodeCall(L.g, (1));
|
||||
}
|
||||
// ----
|
||||
// TypeError 3509: (78-81): Expected regular external function type, or external view on public function. Cannot use library functions for abi.encodeCall.
|
||||
Reference in New Issue
Block a user