/+ dub.json:
{
"name": "test",
"dependencies": {
}
}
+/
struct S
{
~this() {}
}
immutable class Imm
{
S s; // this is immutable value because whole class is immutable
this()
{
s = S();
}
~this() {} // Comment out this to fix this compilation error:
// Error: `immutable` method `serializer_bug.Imm.~this` is not callable using a mutable object
// What mutable object is meant here?
}
void main()
{
auto ic = new immutable Imm();
}
Run: $ dub --single bug.d