[Issue 19210] Poor error message for `return` function parameter that is not `ref`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jul 31 09:59:38 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=19210
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #11480 "Fix 19210: Poor error message for `return`
function parameter that is not `ref`" was merged into master:
- 0f4d552a012575d2f9488255606c29ce9a238649 by Geod24:
Fix 19210: Poor error message for `return` function parameter that is not
`ref`
If the type does not have references, adding `return` won't help.
This we only suggest adding `return` when it actually has an effect.
In addition, value types parameter are now qualified of "local variable",
because that's what they are.
Last, when the error is on `this`, the message advise to annotate the
function.
https://github.com/dlang/dmd/pull/11480
--
More information about the Digitalmars-d-bugs
mailing list