[Issue 860] New: Typedef of an alias in another module used as template parameter combined with circular imports fails strangely
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 20 12:32:03 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=860
Summary: Typedef of an alias in another module used as template
parameter combined with circular imports fails strangely
Product: D
Version: 1.00
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: minor
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: deewiant at gmail.com
A bug quite hard to summarize understandably. The code may help:
--
module aliasesType;
alias int myAlias;
--
module definesType;
import aliasesType;
import usesType; // creates the import cycle
typedef myAlias myTypedef;
--
module usesType;
import definesType;
template T(x) {}
// just use T with myTypedef somehow, doesn't matter what this is
mixin T!(myTypedef);
--
Compiling the definesType module results in the error "definesType.d(5): Error:
identifier 'myAlias' is not defined". Using the fully qualified name
"aliasesType.myAlias" instead fixes this error.
--
More information about the Digitalmars-d-bugs
mailing list