Bug 12371 – Error: undefined identifier with mixins

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-15T02:36:00Z
Last change time
2014-03-18T21:20:32Z
Assigned to
nobody
Creator
kozzi11

Comments

Comment #0 by kozzi11 — 2014-03-15T02:36:35Z
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?
Comment #1 by k.hara.pg — 2014-03-17T16:56:16Z
main.d and B.d looks same.
Comment #2 by kozzi11 — 2014-03-18T00:46:49Z
(In reply to comment #1) > main.d and B.d looks same. Copy and paste mistake :): //B.d module B; public import A; class C1 : C2!(C1){}
Comment #3 by k.hara.pg — 2014-03-18T20:49:32Z
This is an invalid issue. See also the comment #1 in issue 12035. https://d.puremagic.com/issues/show_bug.cgi?id=12035#c1 *** This issue has been marked as a duplicate of issue 12035 ***
Comment #4 by dlang-bugzilla — 2014-03-18T21:20:32Z