[Issue 1986] New: Mixin code from website doesn't compiler

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 10 19:02:52 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1986

           Summary: Mixin code from website doesn't compiler
           Product: D
           Version: 2.012
          Platform: PC
               URL: http://www.digitalmars.com/d/2.0/mixin.html
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: bartosz at relisoft.com


This example from http://www.digitalmars.com/d/2.0/mixin.html doesn’t
compile:

template GenStruct(char[] Name, char[] M1) {
    const char[] GenStruct = "struct " ~ Name ~ "{ int " ~ M1 ~ "; }"; 
}

mixin(GenStruct!("Foo", "bar"));


-- 



More information about the Digitalmars-d-bugs mailing list