https://issues.dlang.org/show_bug.cgi?id=14666
Issue ID: 14666
Summary: Bogus forward reference error
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
*****************
module d.base.location;
struct Location {
import d.base.name;
}
*****************
auto getNames() {
import d.lexer;
}
enum Names = getNames;
*****************
module d.lexer;
import d.base.location;
struct Token {
Location location;
}
*****************
I get libd/src/d/lexer.d(5): Error: struct d.lexer.Token has forward references
when compiling d/base/location.d
--