[Issue 16022] New: dmd assertion failure due to misplaced comma operator

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri May 13 11:42:40 PDT 2016


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

          Issue ID: 16022
           Summary: dmd assertion failure due to misplaced comma operator
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: mail at skoppe.eu

I changed something in my code to:

    bool foo()
    {
        return (
            token.type == Type.Colon, // Typo: wanted logical operator instead
of comma
            token.type == Type.Comma);
    }

And I suddenly got this back from dmd:

    linkage = 0
    Assertion failed: (0), function visit, file tocsym.c, line 246.
    dmd failed with exit code -6.

In the function foo I wanted to type || instead of the comma. Regardless, it
shouldn't fail with an assertion.

--


More information about the Digitalmars-d-bugs mailing list