Bug 12539 – Compiler crash when looking up a nonexistent tuple element in an associative array

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-07T11:29:00Z
Last change time
2014-04-08T05:20:03Z
Keywords
ice, pull
Assigned to
nobody
Creator
gamecubic.dev+d.issue.tracker

Comments

Comment #0 by gamecubic.dev+d.issue.tracker — 2014-04-07T11:29:30Z
Happens on Windows 7 x86_64 with DMD 2.065 Does not happen on DPaste ``` template Tuple (E...) { alias Tuple = E; } void main () { // Would be a string tuple. alias Foo = Tuple!(); int[string] map = []; auto a = map[Foo[0]]; } ``` I would expect a build failure (as happens on DPaste), but not a compiler crash.
Comment #1 by k.hara.pg — 2014-04-07T18:23:21Z
Comment #2 by github-bugzilla — 2014-04-08T04:55:34Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8f70c6f23c8d615affd73e1a23fcb32ef5ddea59 fix Issue 12539 - Compiler crash when looking up a nonexistent tuple element in an associative array https://github.com/D-Programming-Language/dmd/commit/3001fb407685e05f68e49742ef43192cf692ee97 Merge pull request #3435 from 9rnsr/fix12539 Issue 12539 - Compiler crash when looking up a nonexistent tuple element in an associative array