mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Extend using-for.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
==== Source: A ====
|
||||
function f(uint x) pure returns (uint) {
|
||||
return x + 2;
|
||||
}
|
||||
function g(uint x) pure returns (uint) {
|
||||
return x + 8;
|
||||
}
|
||||
|
||||
==== Source: B ====
|
||||
import {f as g, g as f} from "A";
|
||||
|
||||
==== Source: C ====
|
||||
contract C {
|
||||
function test(uint x, uint y) public pure returns (uint, uint) {
|
||||
return (x.f(), y.g());
|
||||
}
|
||||
}
|
||||
|
||||
using {M.g, M.f} for uint;
|
||||
|
||||
import "B" as M;
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test(uint256,uint256): 1, 1 -> 9, 3
|
||||
Reference in New Issue
Block a user