This code doesn't work(on git head master):
-----------
immutable class A { this(){} }
void main() { immutable a = new immutable A(); }
-----------
A result of git bisect is this commit:
https://github.com/D-Programming-Language/dmd/commit/599ba0718771b25d255e14175cc8bd31d2a1842e
According to this commit, it is right behavior that following code become errors:
-----------
class A { this(){} }
void main() { immutable a = new immutable A(); }
-----------
On the other hand, following code is compiled correctly:
-----------
class A { this() immutable {} }
void main() {
immutable a = new immutable A();
}
-----------
In *immutable class*, the result that is equal to the latter is expected.