January 22, 2021 [Issue 21572] Implicit conversion from `immutable(T)[][]` to `scope const(T)[][]` is missing | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21572 ag0aep6g <ag0aep6g@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |ag0aep6g@gmail.com Resolution|--- |INVALID --- Comment #1 from ag0aep6g <ag0aep6g@gmail.com> --- Conversion from `immutable(char)[][]` to `const(char)[][]` is not sound. Consider: immutable(char)[][] i = [""]; const(char)[][] c = i; char[] m = ['x']; c[0] = m; `i[0][0]` would have the same address as `m[0]`. You'd have a `char` that is both immutable and mutable. `scope` is irrelevant, as far as I see. Closing as invalid. Please reopen if I'm missing something. In particular, if you think `scope` is relevant, please describe how it makes the conversion valid. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply