UCFS does not work for nested functions?
Steffen Wenz via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun May 18 01:15:07 PDT 2014
Hi,
Just noticed that using UFCS does not work for nested functions,
and was wondering whether that's intended, and what the rationale
behind it is:
class X {
void foo() {}
}
void main() {
// moving bar to module scope solves the error below
void bar(X x) {}
X x;
x.foo(); // ok
bar(x); // ok
x.bar(); // Error: no property 'bar' for type 'nested.X'
}
More information about the Digitalmars-d-learn
mailing list