mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Implemented events with function type as one of its indexed parameters
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
contract C {
|
||||
event Test(function() external indexed);
|
||||
function f() public {
|
||||
emit Test(this.f);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
library L {
|
||||
function f() public {
|
||||
int x = 1;
|
||||
}
|
||||
}
|
||||
|
||||
contract C {
|
||||
event Test(function() external indexed);
|
||||
|
||||
function g() public {
|
||||
Test(L.f);
|
||||
}
|
||||
}
|
||||
|
||||
contract D {
|
||||
event Test(function() external);
|
||||
|
||||
function f() public {
|
||||
Test(L.f);
|
||||
}
|
||||
}
|
||||
|
||||
contract E {
|
||||
event Test(function() external indexed);
|
||||
|
||||
using L for D;
|
||||
|
||||
function k() public {
|
||||
Test(D.f);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9553: (140-143): Invalid type for argument in function call. Invalid implicit conversion from function () to function () external requested.
|
||||
// TypeError 9553: (230-233): Invalid type for argument in function call. Invalid implicit conversion from function () to function () external requested.
|
||||
// TypeError 9553: (345-348): Invalid type for argument in function call. Invalid implicit conversion from function D.f() to function () external requested.
|
||||
Reference in New Issue
Block a user