Bug 9338 – Compiler segfaults if try to CTFE member function without valid 'this'
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-17T11:48:00Z
Last change time
2015-06-09T05:10:43Z
Keywords
CTFE, ice, pull
Assigned to
nobody
Creator
szadows
Comments
Comment #0 by szadows — 2013-01-17T11:48:55Z
This code segfaults:
----
mixin template SomeMixin()
{
void test()
{
enum members = makeArray();
}
string[] makeArray()
{
return ["a"];
}
}
class Foo
{
mixin SomeMixin;
}
----
Comment #1 by k.hara.pg — 2013-01-17T23:53:35Z
This is not related to mixin. This code also segfaults:
class Foo
{
void test()
{
enum members = makeArray();
}
string[] makeArray()
{
return ["a"];
}
}