Bug 13655 – clarify that a ref parameter cannot bind to an rvalue
Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-10-25T16:09:45Z
Last change time
2017-12-30T17:38:45Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Shriramana Sharma
Comments
Comment #0 by samjnaa — 2014-10-25T16:09:45Z
Hello. The following code:
ref int foo(ref int x) { return x ; }
void main () { foo(3) ; }
produces the error message:
"function rvalue_argument.foo (ref int x) is not callable using argument types (int)"
It would be more meaningful if this could be clarified on the lines of:
"argument ref int x of function rvalue_argument.foo cannot bind to an rvalue"
Comment #1 by nick — 2017-12-30T17:38:45Z
*** This issue has been marked as a duplicate of issue 11529 ***