[Issue 7600] Generate better error message with lvalue mismatch
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 30 09:39:58 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=7600
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |razvan.nitu1305 at gmail.com
Resolution|--- |FIXED
--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
It now prints:
onlineapp.d(6): Error: function onlineapp.foo(ref string x) is not callable
using argument types (string)
onlineapp.d(6): cannot pass rvalue argument "var" of type string to
parameter ref string x
onlineapp.d(8): Error: function onlineapp.bar(ref int x) is not callable using
argument types (immutable(int))
onlineapp.d(8): cannot pass argument x of type immutable(int) to
parameter ref int x
Which is the correct behavior. Closing as fixed.
--
More information about the Digitalmars-d-bugs
mailing list