[Issue 4841] -inline wrecks nested struct with alias template parameter (An array()/map inlining problem)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 1 04:42:25 PST 2013


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



--- Comment #11 from bearophile_hugs at eml.cc 2013-03-01 04:42:22 PST ---
import std.array: array;
import std.algorithm: map;
void main() {
    int[] foo;
    auto r1 = map!(i => foo[0])([0]);
    auto r2 = array(r1);
}


Gives (dmd 2.063 alpha):

temp.d(5): Error: function D main is a nested function and cannot be accessed
from std.array.array!(MapResult!(__lambda2, int[])).array

-- 
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