Fix checks for "using for ... global" for libraries.

This commit is contained in:
chriseth
2022-05-02 12:40:56 +02:00
parent 25923c1f08
commit 505fa7763f
11 changed files with 122 additions and 24 deletions
@@ -0,0 +1,18 @@
using L for I;
interface I { function f() external pure returns (uint); }
library L {
function execute(I i) internal pure returns (uint) {
return i.f();
}
}
contract C is I {
function x() public view returns (uint) {
I i = this;
return i.execute();
}
function f() public pure returns (uint) { return 7; }
}
// ====
// compileViaYul: also
// ----
// x() -> 7