https://issues.dlang.org/show_bug.cgi?id=18719 introduced a regression as it only checks whether a this() call is present, but not what the this call actually does.
For example, this slightly modified example from 18719 no produces an error even though it sets x only once:
---
struct S
{
int x = -1;
this(int y) immutable
{
x = y;
import std.stdio;
writeln("Ctor called with ", y);
}
void opAssign(int) immutable;
}
class C
{
S x;
this() immutable
{
this(42); /* Initializes x. */
x = 13; /* Breaking immutable, or ok? */
}
this(int x) immutable
{
}
}
---
Comment #1 by razvan.nitu1305 — 2018-07-02T10:13:45Z