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


hst...@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hst...@quickfur.ath.cx


--- Comment #4 from hst...@quickfur.ath.cx 2012-10-16 17:24:02 PDT ---
Here's a somewhat simpler case:

auto cprod(R1,R2)(R1 A, R2 B)
{
    return zip(sequence!"n"(cast(size_t)0), A.save, B.save, repeat(A),
repeat(B))
        .map!(function(a) => chain(
            zip(repeat(a[1]), take(a[4].save,a[0])),
            zip(take(a[3].save,a[0]+1), repeat(a[2]))
        )).joiner;
}

void main()
{
    auto A = sequence!"2*n"(0);
    auto B = sequence!"2*n+1"(0);
    auto AB = cprod(A,B);

    auto C = sequence!"100+n"(0);
    auto D = sequence!"200+n"(0);
    auto CD = cprod(C,D);
}

Produces the error:

Error: function
test3.cprod!(Sequence!("2*n",Tuple!(int)),Sequence!("2*n+1",Tuple!(int))).cprod.map!(__
funcliteral2).map!(Zip!(Sequence!("n",Tuple!(uint)),Sequence!("100+n",Tuple!(int)),Sequence!("200+n",Tupl
e!(int)),Repeat!(Sequence!("100+n",Tuple!(int))),Repeat!(Sequence!("200+n",Tuple!(int))))).map
is a neste
d function and cannot be accessed from
test3.cprod!(Sequence!("100+n",Tuple!(int)),Sequence!("200+n",Tupl
e!(int))).cprod


Commenting out either the first three lines (A, B, AB) or the second three
lines (C, D, CD) makes the problem go away.

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

Reply via email to