solidity/test/libsolidity/syntaxTests/using/global_working.sol

15 lines
324 B
Solidity
Raw Normal View History

2021-11-16 16:01:09 +00:00
==== Source: A ====
using {f} for S global;
// this should not conflict
using {f} for S;
struct S { uint x; }
function gen() pure returns (S memory) {}
function f(S memory _x) pure returns (uint) { return _x.x; }
==== Source: B ====
function test() pure
{
uint p = g().f();
p++;
}
import {gen as g} from "A";
// ----