September 23, 2009 [Issue 3336] ICE(glue.c) declaring AA with tuple key, only with -g | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bernard Helyer | http://d.puremagic.com/issues/show_bug.cgi?id=3336 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-valid-code |accepts-invalid, | |ice-on-invalid-code --- Comment #9 from Don <clugdbug@yahoo.com.au> 2009-09-23 05:52:50 PDT --- This is ice-on-invalid: the key of an AA must be a type. Although the declaration is accepted when the -g flag isn't used, that's also a bug. It's pretty meaningless -- there's no way to put anything into the AA! The declaration should be rejected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 24, 2009 [Issue 3336] ICE(glue.c) declaring AA with tuple key, only with -g | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bernard Helyer | http://d.puremagic.com/issues/show_bug.cgi?id=3336 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #10 from Don <clugdbug@yahoo.com.au> 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", index->toBasetype()->toChars()); break; } 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 06, 2009 [Issue 3336] ICE(glue.c) declaring AA with tuple key, only with -g | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bernard Helyer | http://d.puremagic.com/issues/show_bug.cgi?id=3336 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #11 from Walter Bright <bugzilla@digitalmars.com> 2009-10-06 02:18:55 PDT --- Fixed dmd 1.048 and 2.033 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation