solidity/test/libsolidity/semanticTests/libraries/internal_library_function_bound_to_interface.sol

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