digitalmars.D.bugs - [Issue 19744] New: Confusing error message when annotating a
- d-bugmail puremagic.com (24/24) Mar 16 2019 https://issues.dlang.org/show_bug.cgi?id=19744
https://issues.dlang.org/show_bug.cgi?id=19744 Issue ID: 19744 Summary: Confusing error message when annotating a non-member function with `return` Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: monkeyworks12 hotmail.com safe int* test(return scope int* n) return { return n; } This prints a mildly nonsensical error message: Error: function `test` static member has no this to which return can apply Specifically, it is the "function `test` static member` part which is confusing. --
Mar 16 2019