digitalmars.D.bugs - [Issue 5505] New: std.functional: Fix for possible lurking bug & replace complex return type with auto
- d-bugmail puremagic.com (37/37) Jan 29 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5505
- d-bugmail puremagic.com (10/10) Jan 29 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5505
- d-bugmail puremagic.com (14/14) Apr 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5505
http://d.puremagic.com/issues/show_bug.cgi?id=5505 Summary: std.functional: Fix for possible lurking bug & replace complex return type with auto Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2011-01-29 16:23:06 PST --- In DMD 2.051, std.functional, line 53: enum testAsStmts = "{"~ElementType.stringof~" "~parmName~"; "~fun~"}()"; I think the line is missing a semicolon after "~fun~". Fixed: enum testAsStmts = "{"~ElementType.stringof~" "~parmName~"; "~fun~";}()"; But the code that uses the enum is commented out for some reason. Line 250, binaryReverseArgs: Why not replace this complex return type: typeof({ ElementType1 a; ElementType2 b; return pred(b, a);}()) binaryReverseArgs(ElementType1, ElementType2)(ElementType1 a, ElementType2 b) { return pred(b, a); } with the simpler: auto binaryReverseArgs(ElementType1, ElementType2)(ElementType1 a, ElementType2 b) { return pred(b, a); } unittests will still pass. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 29 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5505 Andrei Alexandrescu <andrei metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |andrei metalanguage.com AssignedTo|nobody puremagic.com |andrei metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 29 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5505 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-04-20 23:47:09 PDT --- Simplifying binaryReverseArgs is now proposed in the pull for bug 7878. https://github.com/D-Programming-Language/phobos/pull/544 So I'd merge this to 7878. *** This issue has been marked as a duplicate of issue 7878 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2012