June 19, 2009 [Issue 3082] Forward Reference Issues w/ Template Literals | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3082 David Simcha <dsimcha@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|DMD |Phobos --- Comment #1 from David Simcha <dsimcha@yahoo.com> 2009-06-19 10:53:14 PDT --- Sorry, accidentally submitted before finishing. Anyhow, the following bug makes template literals near useless when used w/ ranges. I think it has to do with the way unaryFun works, but I'm not sure. import std.algorithm; struct Foo { uint num; } void main() { Foo[] foos; auto bar = map!( (a) { return a.num; } )(foos); } C:\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(120): Error: forward reference to type __T2 C:\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(120): Error: cannot implicitly convert expression (Foo) of type Foo to __T2 C:\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(120): Error: forward reference to inferred return type of function call __dgliteral1(cast(__T2)(Foo)) C:\home\dsimcha\bin\test.d(111): Error: template instance test.main.Map!(__dgliteral1,Foo[]) error instantiating Process terminated with status 1 (0 minutes, 0 seconds) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 16, 2010 [Issue 3082] Forward Reference Issues w/ Template Literals | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3082 David Simcha <dsimcha@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from David Simcha <dsimcha@yahoo.com> 2010-08-15 21:19:28 PDT --- This is one of the many bugs that depended on bug 3294 and therefore got resolved when 3294 did. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation