[Issue 12035] Regression 2.065: Mixin string inside mixin template inside template can no longer acces template argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 29 17:47:04 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12035


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2014-01-29 17:46:58 PST ---
(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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list