mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
23 lines
319 B
Solidity
23 lines
319 B
Solidity
interface I {}
|
|
contract E is I {}
|
|
|
|
library L {
|
|
function foo(I i) internal pure returns (uint) {
|
|
return 42;
|
|
}
|
|
}
|
|
|
|
contract C {
|
|
using L for I;
|
|
|
|
function test() public returns (uint) {
|
|
E e = new E();
|
|
return I(e).foo();
|
|
}
|
|
}
|
|
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// test() -> 42
|