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