Bug 5349 – ICE(toir.c): nested class in static member function
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-12-14T04:17:00Z
Last change time
2015-06-09T05:11:54Z
Keywords
diagnostic, ice-on-invalid-code, patch
Assigned to
nobody
Creator
ibuclaw
Comments
Comment #0 by ibuclaw — 2010-12-14T04:17:17Z
From fail_compilation/fail224.d
int gi;
class A
{
int x = 42;
void am()
{
static void f()
{
class B
{
void bm()
{
gi = x;
}
}
(new B).bm();
}
f();
}
}
void main()
{
(new A).am();
}
Fails with an internal error message. Rather than something meaningful.
Regards