[Issue 17910] New: Can't have UFCS in aggregate types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 17 12:35:53 UTC 2017
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: nobody at puremagic.com
Reporter: dfj1esp02 at sneakemail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list