Weird UFC and opCall issues
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Dec 17 18:45:00 PST 2014
On Thursday, 18 December 2014 at 02:42:32 UTC, Jay Pinkman wrote:
> source/main.d(12): Error: need 'this' for 'opCall' of type
> 'void(string y)'
D doesn't have a really clean separation between static and
non-static methods. It sees an opCall and thinks you're trying to
call it, but since it isn't static, it complains you don't have a
this.
> source/main.d(13): Error: no property 'x' for type 'string'
I don't think UFCS works with structs nor local variables anyway,
so this error makes sense to me.
More information about the Digitalmars-d-learn
mailing list