Bug 23506 – choose/chooseAmong don't work with immutable referencing structs

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-11-24T10:39:01Z
Last change time
2024-12-13T19:25:55Z
Keywords
industry
Assigned to
No Owner
Creator
FeepingCreature
Moved to GitHub: dmd#18137 →

Comments

Comment #0 by default_357-line — 2022-11-24T10:39:01Z
yadda yadda immutable bug in phobos yadda yadda following code import std; void main() { immutable struct S { int[] ints; } auto first = S([0]), second = S([1]); choose(true, only(first), only(second)); } bla bla bla should compile but instead giant wall of template errors I am so tired.
Comment #1 by default_357-line — 2022-11-24T10:39:16Z
chooseAmong too.
Comment #2 by robert.schadek — 2024-12-13T19:25:55Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18137 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB