www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12035] New: Regression 2.065: Mixin string inside mixin template inside template can no longer acces template argument

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12035

           Summary: Regression 2.065: Mixin string inside mixin template
                    inside template can no longer acces template argument
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code benjamin-thaut.de



PST ---
Created an attachment (id=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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 29 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12035


Benjamin Thaut <code benjamin-thaut.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 29 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12035


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

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




 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: -------
Jan 29 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12035


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kozzi11 gmail.com



*** Issue 12371 has been marked as a duplicate of this issue. ***

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