[Issue 20233] opDispatch hides alias this properties
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 22 14:40:58 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20233
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #4 from Steven Schveighoffer <schveiguy at yahoo.com> ---
opDispatch should be considered before alias this, but apparently it disables
the alias this completely. I thought this would fix the problem but it doesn't:
-------
auto opDispatch(string name, A...)(A args) if(args.length > 0)
{
return mixin("this.coords." ~ name ~ "(args)");
}
-------
It now simply says there's no property ptr or length for Point. So I think even
though the original bug report was fixed, it wasn't fully fixed.
I think the above should work. As of now, the alias this is completely ignored.
--
More information about the Digitalmars-d-bugs
mailing list