[Issue 15817] ICE (with no stacktrace) instead of 'cannot index null array counts' with CTFE AA
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Mar 21 08:30:16 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15817
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |CTFE, ice
Hardware|x86 |All
OS|Mac OS X |All
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
Dustmited test case:
S[] split(S)(S s)
{
size_t istart;
S[] result;
foreach (i, c ; s)
result ~= s[istart .. i];
return result;
}
int fun(string b)
{
auto targets = b.split;
uint[string] counts;
foreach (a; targets)
counts[a]++;
return 0;
}
void fun2()
{
enum a = `a1`;
static b = fun(a);
}
--
More information about the Digitalmars-d-bugs
mailing list