[Issue 9423] Missed conversion of lambda literal with ref argument
https://issues.dlang.org/show_bug.cgi?id=9423 Paul Backus changed: What|Removed |Added Status|NEW |RESOLVED CC||snarwin+bugzi...@gmail.com Resolution|--- |DUPLICATE --- Comment #5 from Paul Backus --- Closing in favor of 11316, since that one covers all storage classes, not just ref. *** This issue has been marked as a duplicate of issue 11316 *** --
[Issue 9423] Missed conversion of lambda literal with ref argument
https://issues.dlang.org/show_bug.cgi?id=9423 Iain Buclaw changed: What|Removed |Added Priority|P2 |P4 --
[Issue 9423] Missed conversion of lambda literal with ref argument
https://issues.dlang.org/show_bug.cgi?id=9423 --- Comment #4 from Mathias LANG --- *** Issue 12830 has been marked as a duplicate of this issue. *** --
[Issue 9423] Missed conversion of lambda literal with ref argument
https://issues.dlang.org/show_bug.cgi?id=9423 Vladimir Panteleevchanged: What|Removed |Added See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=10602 --
[Issue 9423] Missed conversion of lambda literal with ref argument
http://d.puremagic.com/issues/show_bug.cgi?id=9423 --- Comment #3 from bearophile_h...@eml.cc 2013-01-30 10:26:15 PST --- A discussion thread, the answers are mixed: http://forum.dlang.org/thread/mixmakdqfmaznmmni...@forum.dlang.org A comment from Timon Gehr: BTW, the pull does not contain a test for the case void foo(int delegate(int) dg){ ... } // 1 void foo(int delegate(ref int) dg){ ... } // 2 void main(){ foo(x=0); } // call 1 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9423] Missed conversion of lambda literal with ref argument
http://d.puremagic.com/issues/show_bug.cgi?id=9423 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Platform|x86 |All OS/Version|Windows |All Severity|normal |enhancement --- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-01-29 09:23:54 PST --- When I fixed bug7705, I decided that lambda inference does not infer parameter storage classes. Instead, users should specify `ref`/`out`/`lazy` explicitly. https://github.com/D-Programming-Language/dmd/pull/809/files#L1R496 Because, explicit specifying of `ref` in call site is sometimes required in newsgroup. void foo(ref int x) {} int n; foo(ref n); // not allowed in today So, current behavior is intended. You should write it as follows: void foo(int delegate(ref int[1]) spam) {} void main() { foo((ref x) = 0); // OK } However, I cannot say clearly whether it's right behavior. I think that the opinion parameter storage classes should be inferred is also worth. Therefore, I'll mark this as 'enhancement'. = A pull to implement this feature: https://github.com/D-Programming-Language/dmd/pull/1580 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9423] Missed conversion of lambda literal with ref argument
http://d.puremagic.com/issues/show_bug.cgi?id=9423 --- Comment #2 from bearophile_h...@eml.cc 2013-01-29 10:00:15 PST --- (In reply to comment #1) Therefore, I'll mark this as 'enhancement'. = A pull to implement this feature: https://github.com/D-Programming-Language/dmd/pull/1580 Thank you Hara. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---