[Issue 10850] Inout substituted incorrectly for delegates/fptrs in inout function signature
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Sep 13 14:24:39 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=10850
--- Comment #7 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> ---
Binding inout to the outer function is probably an even easier implementation,
than what I propose. But restricting.
Also:
---
void foo(ref inout(int) x){
inout(int)* bar(inout(int)*) { return &x; }
int y;
bar(&y); // error
}
---
Error: modify inout to mutable is not allowed inside inout function
---
The error message should be probably "cannot implicitly convert expression (&
y) of type int* to inout(int)*" like for any other attempt co convert mutable
to inout.
--
More information about the Digitalmars-d-bugs
mailing list