May 09, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10052

           Summary: Tuple not assignable in shared static module
                    constructor
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: tommitissari@hotmail.com


--- Comment #0 from Tommi <tommitissari@hotmail.com> 2013-05-09 13:32:12 PDT ---
module main;

import std.typecons;

shared static Tuple!(int, int) ints;

shared static this()
{
    ints[0] = 4; // #1: OK
    ints[1] = 6; // #2: OK

    ints = tuple(4, 6); // #3
}

// #3:
// Error: template std.typecons.Tuple!(int, int).Tuple.opAssign
// does not match any function template declaration. Candidates are:
// /usr/share/dmd/src/phobos/std/typecons.d(483): std.typecons.
// Tuple!(int, int).Tuple.opAssign(R)(R rhs) if (isTuple!(R) &&
allSatisfy!(isAssignable, Types))
// Error: template std.typecons.Tuple!(int, int).Tuple.opAssign(R)(R rhs)
// if (isTuple!(R) && allSatisfy!(isAssignable, Types)) cannot deduce
// template function from argument types !()(Tuple!(int, int))

void main()
{}

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