Thread overview | |||||
---|---|---|---|---|---|
|
March 18, 2018 [Issue 18078] [CTFE] wrong initialization of array member with inout opIndex | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=18078 bitter.taste@gmx.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bitter.taste@gmx.com --- Comment #1 from bitter.taste@gmx.com --- Reduced to: --- struct S { int x; version (problem) void opAssign(S o) { x = o.x; } } struct Foo { S[1] data; ref inout(S) g() inout { return data[0]; } this(S a) { g() = a; } } void main() { enum x = Foo(S(42)); assert(x.data[0].x == 42); } --- The problem disappears if you remove `opAssign` (or the inout qualifiers). -- |
August 18, 2018 [Issue 18078] [CTFE] wrong initialization of array member with inout opIndex | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=18078 ag0aep6g <ag0aep6g@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |ag0aep6g@gmail.com -- |
December 17, 2022 [Issue 18078] [CTFE] wrong initialization of array member with inout opIndex | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=18078 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- |
Copyright © 1999-2021 by the D Language Foundation