www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17976] New: core.exception.AssertError ddmd/dsymbolsem.d(1624)


          Issue ID: 17976
           Summary: core.exception.AssertError ddmd/dsymbolsem.d(1624)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: issues.dlang jmdavisProg.com

I guess that this is technically an ICE, but it doesn't really cause problems.
The compiler really shouldn't be failing an assertion though. This code:

struct S
    this(string a, string a)

void main()

results in this error

test.d(3): Error: constructor test.S.this parameter this.a is already defined
core.exception.AssertError ddmd/dsymbolsem.d(1624): Assertion failure

The error message is correct, but the AssertError that happens afterwards
shouldn't be happening.

Nov 09 2017