www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11095] New: mixed in mixin templates not instantiated in templates?

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

           Summary: mixed in mixin templates not instantiated in
                    templates?
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simendsjo gmail.com



Using dmd head

mixin template B()
{
    enum A = true;
}
template A()
{
    mixin B; // shouldn't this just insert B?
}

template C()
{
    enum C = true;
}

void main() {
    static assert(C!() == true); // ok
    static assert(A!() == true);
}

t.d(17): Error: void has no value
t.d(17): Error: incompatible types for ((A!()) == (true)): 'void' and 'bool'

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