On 6/3/16 8:03 AM, chmike wrote:
import std.stdio;
class Info
{
final string name() { return nameImpl(); }
protected abstract string nameImpl();
}
final class MyInfo : Info
{
this() { assert(__ctfe); }
private __gshared info_ = new MyInfo; // Line 12
static string name() { return "MyInfo"; }
protected override string nameImpl() { return name(); }
}
void main()
{
writeln("Hello world!");
}
Yes, this is a forward reference bug.
Move the info_ member to the end of the class and it compiles.
Please file https://issues.dlang.org
-Steve