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


Andrej Mitrovic <andrej.mitrov...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrov...@gmail.com


--- Comment #3 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-02-22 
12:10:35 PST ---
A workaround for those that need this code to work is to use static (it can be
used for type inference just like auto):

import std.stdio;
import std.algorithm;
auto fun(int[] a)
{
    static y = 3;
    return map!((x) { return x == y; })(a);
}
void main()
{
    auto a = [ 1, 2, 3, 4, 5 ];
    auto m = fun(a);
    writeln(m);
}

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

Reply via email to