Bug 19649 – Misleading error message for duplicate constraints
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-02-05T09:46:19Z
Last change time
2023-01-14T10:18:41Z
Keywords
bootcamp, diagnostic, pull
Assigned to
Nick Treleaven
Creator
elpenguino+D
Comments
Comment #0 by elpenguino+D — 2019-02-05T09:46:19Z
```
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...)
Comment #1 by dlang-bot — 2023-01-03T18:24:56Z
@ntrel created dlang/dmd pull request #14779 "Fix Issue 19649 - Misleading error for duplicate constraints" fixing this issue:
- Fix Issue 19649 - Misleading error for duplicate constraints
https://github.com/dlang/dmd/pull/14779
Comment #2 by dlang-bot — 2023-01-04T22:48:10Z
dlang/dmd pull request #14779 "Fix Issue 19649 - Misleading error for duplicate constraints" was merged into stable:
- 88e7839bd5ade60530be89a2806ef1bbab7faa4c by Nick Treleaven:
Fix Issue 19649 - Misleading error for duplicate constraints
https://github.com/dlang/dmd/pull/14779
Comment #3 by dlang-bot — 2023-01-14T10:18:41Z
dlang/dmd pull request #14813 "Merge Stable into master" was merged into master:
- 0f542f976ca63d8994ac7383b6c6e8074a197f3b by Nick Treleaven:
Fix Issue 19649 - Misleading error for duplicate constraints
https://github.com/dlang/dmd/pull/14813