[Issue 20233] opDispatch hides alias this properties
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 21 03:47:20 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20233
--- Comment #1 from Lorenzo Cogotti <micia at inventati.org> ---
Sorry, there was a typo in my code listing, here is the correct version,
producing the same errors:
-----
module main;
struct Point
{
int[2] coords;
alias coords this;
auto opDispatch(string name, A...)(A args)
{
return mixin("this.coords." ~ name ~ "(args)");
}
}
void main()
{
import std.stdio;
Point p;
writeln(p.ptr, p.length);
}
--
More information about the Digitalmars-d-bugs
mailing list