http://d.puremagic.com/issues/show_bug.cgi?id=5753
Summary: Disallow map() of void function Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-03-19 07:11:03 PDT --- This code compiles with no errors (DMD 2.052), but in my opinion it has to raise a compile-time error, because map() must statically refuse functions that return void: import std.algorithm; void foo() {} void main() { int[] data = [1, 2, 3]; map!((int i){ return foo(); })(data); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------