www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12371] New: Error: undefined identifier with mixins

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: kozzi11 gmail.com


--- Comment #0 from Daniel Kozak <kozzi11 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: -------
Mar 15 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12371



--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-03-17 16:56:16 PDT ---
main.d and B.d looks same.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12371



--- Comment #2 from Daniel Kozak <kozzi11 gmail.com> 2014-03-18 00:46:49 PDT ---
(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){} -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 18 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12371


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2014-03-18 20:49:32 PDT ---
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 ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 18 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12371


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow gmail.com


--- Comment #4 from Vladimir Panteleev <thecybershadow gmail.com> 2014-03-19
06:20:32 EET ---
Introduced in https://github.com/D-Programming-Language/dmd/pull/2854

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 18 2014