2021-11-16 16:01:09 +00:00
|
|
|
==== Source: A ====
|
|
|
|
using {f} for S global;
|
|
|
|
struct S { uint x; }
|
|
|
|
function gen() pure returns (S memory) {}
|
|
|
|
function f(S memory _x) pure returns (uint) { return _x.x; }
|
|
|
|
function f1(S memory _x) pure returns (uint) { return _x.x + 1; }
|
|
|
|
==== Source: B ====
|
|
|
|
contract C {
|
|
|
|
// Here, f points to f1, so we end up with two different functions
|
2022-08-30 09:53:02 +00:00
|
|
|
// attached as S.f
|
2021-11-16 16:01:09 +00:00
|
|
|
using {f} for S;
|
|
|
|
|
|
|
|
function test() pure public
|
|
|
|
{
|
|
|
|
uint p = g().f();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
import {gen as g, f1 as f, S} from "A";
|
|
|
|
import "A" as A;
|
|
|
|
// ----
|
2022-08-30 09:53:02 +00:00
|
|
|
// TypeError 6675: (B:184-189): Member "f" not unique after argument-dependent lookup in struct S memory.
|