Comment #0 by pro.mathias.lang — 2020-07-27T04:56:33Z
```
enum Enum
{
A,
B,
}
class Klass
{
immutable Object wat;
this (Enum value)
{
final switch (value)
{
case Enum.A:
case Enum.B:
break;
}
this.wat = new immutable Object();
}
}
void main() {}
```
According to run.dlang.org:
```
2.061 to 2.079.1: Success and no output
Since 2.080.1: Failure with output: onlineapp.d(19): Error: immutable field `wat` initialization is not allowed in loops or after labels
```
Moving the initialization before the switch works.
Comment #1 by moonlightsentinel — 2020-07-27T09:41:23Z