www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4692] New: Cyclic import breaks is() in a static if in a struct

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4692

           Summary: Cyclic import breaks is() in a static if in a struct
           Product: D
           Version: D1
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: nyphbl8d gmail.com


--- Comment #0 from William Moore <nyphbl8d gmail.com> 2010-08-20 14:10:04 PDT
---
Compilation fails with:
breaker.d(11): Error: identifier 'r' is not defined
breaker.d(7): Error: template instance breaker.ElemType!() error instantiating

given the following for breaker.d:

module breaker;
import breaker;

void main(){}

struct Test {
  static if (is(ElemType!())) {}
}

template ElemType() {
  alias r ElemType;
}




Note that when you remove "import breaker;", the code compiles without error. 
This was distilled from a 4 module circular import.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 20 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4692


Rainer Schuetze <r.sagitario gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario gmx.de


--- Comment #1 from Rainer Schuetze <r.sagitario gmx.de> 2010-08-21 00:46:14
PDT ---
could be a variation of bug 4302.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 21 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4692


William Moore <nyphbl8d gmail.com> changed:

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


--- Comment #2 from William Moore <nyphbl8d gmail.com> 2010-10-05 07:45:47 PDT
---
This seems to be fixed in the latest DMD 1.064.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 05 2010