[Issue 14666] New: Bogus forward reference error

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 8 17:12:45 PDT 2015


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: nobody at puremagic.com
          Reporter: deadalnix at gmail.com

*****************

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

--


More information about the Digitalmars-d-bugs mailing list