Thread overview
[Issue 19210] Poor error message for `return` function parameter that is not `ref`
Aug 31, 2018
Mike Franklin
Jul 30
Dlang Bot
Jul 31
Dlang Bot
August 31, 2018
https://issues.dlang.org/show_bug.cgi?id=19210

Mike Franklin <slavo5150@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |safe
           Severity|enhancement                 |normal

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

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

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

--- Comment #1 from Dlang Bot <dlang-bot@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

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Dlang Bot <dlang-bot@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

--