immutable postblit unusable?

Cauterite cauterite at gmail.com
Sun Feb 11 07:50:52 UTC 2018


https://dpaste.dzfl.pl/80d2a208519c

struct A {
	this(this) immutable {}
}

struct B {
	A a;
}

// Error: immutable method f18.A.__postblit is not callable using 
a mutable object

-------------------------

I honestly don't know what to make of this.
I guess the auto-generated postblit of B is throwing this?

Does it even make sense to have an immutable postblit?
Should such code be explicitly rejected?


More information about the Digitalmars-d mailing list