Allow type(Contract).name for abstract contracts and interfaces

This commit is contained in:
Harikrishnan Mulackal
2020-08-27 13:37:08 +02:00
parent 161ed4c948
commit 1c066b1059
4 changed files with 45 additions and 0 deletions
@@ -2,6 +2,20 @@ contract Test {
function f() public pure returns (string memory) {
return type(C).name;
}
function g() public pure returns (string memory) {
return type(A).name;
}
function h() public pure returns (string memory) {
return type(I).name;
}
}
abstract contract A {
function f() virtual public pure;
}
interface I {
function f() external pure;
}
contract C {