[Issue 12371] New: Error: undefined identifier with mixins

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 15 02:36:40 PDT 2014


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

           Summary: Error: undefined identifier with mixins
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: kozzi11 at gmail.com


--- Comment #0 from Daniel Kozak <kozzi11 at gmail.com> 2014-03-15 02:36:35 PDT ---
Below code has compile ok with 2.064, but produce error with 2.065

//main.d
module main;
import B;

void main() {
    auto c = new C1();
}

//B.d
module main;
import B;

void main() {
    auto c = new C1();
}

//A.D
module A;

class C2(T)
{
    mixin(testMixin!(typeof(this)));
}

auto testT(Class)() { return 0; }

template testMixin(Tclass)
{
    enum : string { testMixin =
        `static getT() {
                return testT!(` ~ Tclass.stringof ~ `);
         }`
    }
}

with 2.065 I got this error message:
A.d-mixin-5(6): Error: undefined identifier C1, did you mean class C2?

-- 
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