[Issue 5641] Local instantiation does not save context properly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 22 11:49:09 PST 2011


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


wfunction at hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wfunction at hotmail.com


--- Comment #2 from wfunction at hotmail.com 2011-02-22 11:46:25 PST ---
Apparently, type-inference also has a problem here:

This code:
    int b = 5;
    writeln(map!((a) { return a + b; })([0, 1, 2, 3]));
outputs:
    [1637916, 1637917, 1637918, 1637919]

if I specify the type of 'a' manually:
    int b = 5;
    writeln(map!((int a) { return a + b; })([0, 1, 2, 3]));
it outputs:
    [0, 1, 2, 3]

Of course, both answers are incorrect, but this might be an indication of
another bug; I don't know.

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


More information about the Digitalmars-d-bugs mailing list