www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15127] New: Parser assertion on wrong code

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

          Issue ID: 15127
           Summary: Parser assertion on wrong code
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: trikko katamail.com

This (wrong!) code:

struct ExampleStruct(S) { }

template ExampleTemplate(K)
{
    enum ExampleTemplate(struct ExampleStruct(K)) = K;
}

void main()
{

}

Trigger a parser error:

dmd: parse.c:4226: Dsymbols* Parser::parseAutoDeclarations(StorageClass, const
utf8_t*): Assertion `token.value == TOKassign' failed.

--
Sep 29 2015