www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6367] New: Multi-assignment for typetuples is bad


           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 puremagic.com
        ReportedBy: bearophile_hugs eml.cc

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: -------
Jul 23 2011