http://d.puremagic.com/issues/show_bug.cgi?id=4661


David Simcha <dsim...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dsim...@yahoo.com
         Resolution|                            |INVALID


--- Comment #1 from David Simcha <dsim...@yahoo.com> 2010-08-17 15:51:49 PDT ---
This bug is invalid because of the way template instantiation from string
lambdas works.  Instantiating map with q{a + 1} produces a completely different
type than map instantiated with q{a + 2}, and therefore storing them in an
array should not be possible.  Take a look at how Map and
std.functional.unaryFun() work.  Also, to illustrate my point, note that the
following code works:

import std.algorithm: map;
void main() {
    auto r1 = map!q{a+1}([1, 2, 3]);
    auto r2 = map!q{a+1}([1, 2, 3]);
    auto a = [r1, r2];
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to