|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.bugs - [Issue 3081] New: unaryFun can't be used to get element out of struct
http://d.puremagic.com/issues/show_bug.cgi?id=3081 Summary: unaryFun can't be used to get element out of struct Product: D Version: 2.030 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: dsimcha yahoo.com import std.algorithm; struct Foo { uint num; } void main() { Foo[] foos; auto bar = map!("a.num")(foos); } C:\dmd\windows\bin\..\..\src\phobos\std\functional.d(89): Error: static assert "Bad unary function: a.num for type Foo" This looks like overzealous error checking, as it worked in the old Phobos and now fails a static assert. Probably has to do with the fact that Foo is in a different module than std.functional.unaryFun. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jun 19 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3081 Jarrett Billingsley <jarrett.billingsley gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jarrett.billingsley gmail.c | |om --- Comment #1 from Jarrett Billingsley <jarrett.billingsley gmail.com> 2009-06-19 09:51:18 PDT --- To whom it may concern: would an "I told you so" dance here be appropriate? ;) String mixins are cute, but we need actual macros to be able to do things like this more generally. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jun 19 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3081 --- Comment #2 from Jarrett Billingsley <jarrett.billingsley gmail.com> 2009-06-19 10:21:55 PDT --- (In reply to comment #1)To whom it may concern: would an "I told you so" dance here be appropriate? ;) String mixins are cute, but we need actual macros to be able to do things like this more generally. Jun 19 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3081 Max Samukha <samukha voliacable.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |samukha voliacable.com --- Comment #3 from Max Samukha <samukha voliacable.com> 2009-06-20 02:56:29 PDT --- Yeah, .stringof shouldn't be used there. But we still can get to the type through the alias. Changing the mixin string to enum testAsExpression = "{ ElementType "~parmName~"; return ("~fun~");}()"; should fix the bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jun 20 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3081 --- Comment #4 from Jarrett Billingsley <jarrett.billingsley gmail.com> 2009-06-20 10:13:42 PDT --- (In reply to comment #3) Jun 20 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3081 --- Comment #5 from Max Samukha <samukha voliacable.com> 2009-06-20 12:18:39 PDT --- Bad enough -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jun 20 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3081 Andrei Alexandrescu <andrei metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrei metalanguage.com Resolution| |FIXED --- Comment #6 from Andrei Alexandrescu <andrei metalanguage.com> 2009-07-03 23:24:17 PDT --- Fixed, will come with the next release. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jul 03 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3081 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla digitalmars.com --- Comment #7 from Walter Bright <bugzilla digitalmars.com> 2009-07-09 02:57:27 PDT --- Fixed dmd 2.031 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jul 09 2009
|