[Issue 6367] New: Multi-assignment for typetuples is bad

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 23 05:28:43 PDT 2011


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

           Summary: Multi-assignment for typetuples is bad
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-07-23 05:28:42 PDT ---
This is a spinoff of issue 6365


This program compiles and runs with no errors (it doesn't assert), DMD 2.054:


import std.typetuple;
void main() {
    TypeTuple!(int, int) f = 10;
    assert(f[0] == 10);
    assert(f[1] == 10);
}


The idea of carring this broken TypeTuple semantics over to Tuples too is icky.
I instead suggest to turn this into a compile-time error.

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