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.