[Issue 19060] [REG2.081] Incorrect "Using this as a type is deprecated" error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 6 13:50:07 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19060
--- Comment #9 from ag0aep6g <ag0aep6g at gmail.com> ---
(In reply to RazvanN from comment #8)
> This is surprising, indeed, and I would say that this is a bug. Why would it
> do that?
Because `alias yoyo = other.x;` is the same as `alias yoyo = this.x;`. They
both mean `alias yoyo = S.x;`. An alias can't refer to a field of a specific
instance.
--
More information about the Digitalmars-d-bugs
mailing list