[Issue 19210] Poor error message for `return` function parameter that is not `ref`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 30 08:55:49 UTC 2020


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@Geod24 created dlang/dmd pull request #11480 "Fix 19210: Poor error message
for `return` function parameter that is not `ref`" fixing this issue:

- 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