www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12239] New: "undefined identifier" with named import and circular reference

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

           Summary: "undefined identifier" with named import and circular
                    reference
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com



14:47:32 EET ---
////// a.d //////
import b : I = J;

class A
{
    I i;
}
////// b.d //////
import a;

class B : A {  }

class J { }
/////////////////

Compiler complains:
a.d(5,4): Error: undefined identifier J

Things that unbreak it:
- Adding "import b;" in a
- Moving "I i;" outside class A
- Making B not depend on A

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