https://issues.dlang.org/show_bug.cgi?id=17910
Issue ID: 17910
Summary: Can't have UFCS in aggregate types
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
struct A
{
void f()
{
SecBuffer b;
b.clear(); //fail
}
private:
import core.sys.windows.sspi;
static void clear(ref SecBuffer sb)
{
sb.BufferType=SECBUFFER_EMPTY;
}
}
alias clear=A.clear;
It is undesirable to declare extension methods at global scope if they use
local imports.
--