Don <> changed:

           What    |Removed                     |Added
           Keywords|                            |patch

--- Comment #10 from Don <> 2009-09-24 00:45:31 PDT ---
PATCH: This is very easy. Just disallow tuples as AA keys.

In mtype.c, in Type *TypeAArray::semantic(Loc loc, Scope *sc), at line 3293:

    switch (index->toBasetype()->ty)
    case Tbool:
    case Tfunction:
    case Tvoid:
    case Tnone:
+    case Ttuple:
        error(loc, "can't have associative array key of %s",

And here's a test case for the test suite. Should compile without error.
template Tuple(T...){
    alias T Tuple;
// Bugzilla 3336
static assert(!is(int[ Tuple!(int, int) ]));

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to