Thread overview | |||||
---|---|---|---|---|---|
|
September 13, 2014 [Issue 11772] Can't call function with `inout` `delegate` as argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11772 --- Comment #1 from Sobirari Muhomori <dfj1esp02@sneakemail.com> --- Another test case --- struct S { void bar(void delegate(inout int*) dg) inout { dg(null); } } void main() { import std.stdio; S s; immutable(S) s2; s2.bar((inout int* p) => writeln(p)); s.bar((inout int* p) => writeln(p)); } --- Error: inout method S.bar is not callable using a immutable object Error: inout method S.bar is not callable using a mutable object --- Works for function, but not for delegate. -- |
September 13, 2014 [Issue 11772] Can't call function with `inout` `delegate` as argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11772 --- Comment #2 from Sobirari Muhomori <dfj1esp02@sneakemail.com> --- void f(inout int*, inout(int)* delegate(inout int*)){} void g() { immutable int a; f(&a,x=>x); } --- Error: function f (inout(int*) _param_0, inout(int)* delegate(inout(int*)) _param_1) is not callable using argument types (immutable(int)*, void) --- Again works for function, but not for delegate. -- |
December 17, 2022 [Issue 11772] Can't call function with `inout` `delegate` as argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11772 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P3 -- |
Copyright © 1999-2021 by the D Language Foundation