Hey,

reading through https://dlang.org/articles/const-faq.html and experimenting a bit:

```
    immutable int i = 3;
    const(int)* p = &i;

    int* q = cast(int*)p;

    assert(q == p && p == &i);

    writeln(i); // 3
*q = 1; // Why does this have no effect at all? No error no nothing?!
    writeln(i); // 3
```

When changing i to non-immutable the `*q=1` sets i to 1.

There is no error message. The `*q=1` simply has no effect at all. Also with `const int i`.

Is that intended?

Reply via email to