[Issue 14667] New: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 929.

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


https://issues.dlang.org/show_bug.cgi?id=14667

          Issue ID: 14667
           Summary: Assertion failed: (type->ty != Tstruct || ((TypeStruct
                    *)type)->sym == this), function semantic, file
                    struct.c, line 929.
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: deadalnix at gmail.com

In src/d/base/location.d
***************

struct Location {
    import d.lexer;
}

In src/d/lexer.d
***************
import d.base.location;

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

$ dmd -c -ofobj/d.o libd/src/d/base/location.d -Isrc
libd/src/d/lexer.d(1): Error: module location from file
libd/src/d/base/location.d must be imported with 'import location;'
Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this),
function semantic, file struct.c, line 929.
Abort trap: 6

Sure the first error is justified, but the assertion failure is somewhat
unexpected. Also, it may reveal a deeper problem.

--


More information about the Digitalmars-d-bugs mailing list