[Issue 19649] New: Misleading error message for duplicate constraints

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 5 09:46:19 UTC 2019


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

          Issue ID: 19649
           Summary: Misleading error message for duplicate constraints
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: elpenguino+D at gmail.com

```
void foo()() 
if (true)
if (true)
{}
void bar() { foo(); }
```
Results in a misleading error message: "Error: cannot use function constraints
for non-template functions. Use `static if` instead"

(I would prefer this syntax being supported...)

--


More information about the Digitalmars-d-bugs mailing list