Created attachment 1317
repro case
I found this bug after bug 12023 was fixed. I used the latest version of the
dmd master branch for this. The attached repro case is a heavily reduced
version of my code.
The issue is that I can no longer reference the template Bar by name because
its template argument Foo is in a different module and seems to be not known
when the mixin inside the "b" module is compiled. This used to work fine with
dmd 2.064 and all versions before that down to at least dmd 2.054.
Just compile all three modules together to see the issue.
Comment #1 by k.hara.pg — 2014-01-29T17:46:58Z
(In reply to comment #0)
> Created an attachment (id=1317) [details]
> repro case
In b.d, pragma(msg) prints the reason.
> alias typeof(this) C;
> pragma(msg, "static class Inner { " ~ C.stringof ~ " m_outer; }");
With 2.064, it prints:
static class Inner { Bar m_outer; }
With git-head, it prints:
static class Inner { Bar!(Foo) m_outer; }
The difference comes from the result of C.stringof. The change is introduced by fixing issue 1748.
In general, using stringof result for the mix-in code is wrong. In this case, you should use aliased name 'C'.
====
Note that, such the use of 'stringof' for code generation is not recommended now.
http://dlang.org/property#stringof
So this is just an invalid issue.
Comment #2 by k.hara.pg — 2014-03-18T20:49:33Z
*** Issue 12371 has been marked as a duplicate of this issue. ***