[Issue 6501] New: import inside of eponymous template does not work	correctly
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Aug 15 20:35:42 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6501
           Summary: import inside of eponymous template does not work
                    correctly
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: jmdavisProg at gmx.com
--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-08-15 20:35:34 PDT ---
This code
template eponymous(string str)
{
    import std.metastrings;
    enum eponymous = Format!("%s", str);
}
void main()
{
    pragma(msg, eponymous!("message"));
}
incorrectly prints this during compilation:
eponymous!("message")
whereas if you move the import outside of the template, it correctly prints
message
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list