Bug 2332 – Initializing const or invariant hashes croaks
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2008-09-02T22:28:00Z
Last change time
2015-06-09T05:15:20Z
Assigned to
bugzilla
Creator
andrei
Comments
Comment #0 by andrei — 2008-09-02T22:28:31Z
This program crashes. Also crashes if you replace const with invariant.
const bool[string] stopWords;
static this()
{
stopWords = [ "a"[]:1 ];
}
void main()
{
"abc" in stopWords;
}