Example:

```
class A
{
    immutable int i;

    this(){}
}

class B : A
{
    this()
    {
        this.i = 3;
    }
}

void main()
{
    auto b = new B;
}
```

throws:
Error: constructor `onlineapp.A.this` missing initializer for immutable field i
Error: cannot modify immutable expression this.i

Why can't I initialize the immutable member in the derived class?

Reply via email to