[Issue 10697] Syntactically Incorrect Alias This Causes Object to Conflict with Itself
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 23 12:34:06 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=10697
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |razvan.nitu1305 at gmail.com
Resolution|--- |INVALID
--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
That's not a syntactically incorrect alias this. That is a an alias called
test1 to typeof(this). Renaming test1 to something else makes the code compile
(with a deprecation warning, at the time of the creation of this post, that
**this** cannot be used as a type, but that's something different).
The compiler cannot simply assume that you were trying to write an alias this
since you could be trying to write an alias to the type of this. Closing as
invalid.
--
More information about the Digitalmars-d-bugs
mailing list