← Back to index
|
Original Bugzilla link
Bug 10414 – Delegate arguments for lazy variadic functions are only inferred in first argument
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-19T08:23:00Z
Last change time
2013-06-27T21:53:22Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
alexander.breckel
Comments
Comment #0
by alexander.breckel — 2013-06-19T08:23:06Z
import std.stdio; void foo(void delegate()[] dgs ...) { foreach(dg; dgs) dg(); } void main() { foo( { writeln(0); }, // first argument works! writeln(1), { writeln(2); }, // error #1 () { writeln(3); }, // error #2 delegate() { writeln(4); }, delegate void() { writeln(6); } ); } // test.d(12): Error: function has no effect in expression (__lambda2) // test.d(13): Error: function has no effect in expression (__lambda3)
Comment #1
by henning — 2013-06-19T12:59:01Z
https://github.com/D-Programming-Language/dmd/pull/2228
Comment #2
by alexander.breckel — 2013-06-19T13:24:45Z
(In reply to comment #1) >
https://github.com/D-Programming-Language/dmd/pull/2228
This pull request fixes the issue for me. Thanks!
Comment #3
by github-bugzilla — 2013-06-27T21:53:06Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/f15dc0455718ca586f3c7d73354e49b43e0f9da8
fix issue 10414 - Delegate arguments for lazy variadic functions are only inferred in first argument
https://github.com/D-Programming-Language/dmd/commit/33d0542342a42ad0562a409d5c3cc24397427c93
Merge pull request #2228 from hpohl/10414 fix issue 10414 - Delegate arguments for lazy variadic functions are only inferred in first argument