D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4692 - Cyclic import breaks is() in a static if in a struct
Summary: Cyclic import breaks is() in a static if in a struct
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-20 14:10 UTC by William Moore
Modified: 2010-10-05 07:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description William Moore 2010-08-20 14:10:04 UTC
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.
Comment 1 Rainer Schuetze 2010-08-21 00:46:14 UTC
could be a variation of bug 4302.
Comment 2 William Moore 2010-10-05 07:45:47 UTC
This seems to be fixed in the latest DMD 1.064.