[Issue 1308] Recursive alias declaration, Error: forward reference to foo
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 15 09:54:44 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=1308
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |razvan.nitu1305 at gmail.com
Resolution|--- |INVALID
--- Comment #3 from RazvanN <razvan.nitu1305 at gmail.com> ---
Currently the error message is:
test.d(3): Error: template instance r!r recursive template expansion
test.d(8): Error: template instance test.r!(r, r) error instantiating
This is the correct behavior because when `alias r!r r` is encountered, the
compiler says "r is an alias to something, let's see to what" and then it tries
to analyze `r!r`. When it takes the first `r` symbol it tries to see what it is
and it sees that r is an alias to the type that it is trying now to evaluate.
Closing as invalid.
--
More information about the Digitalmars-d-bugs
mailing list