www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23506] New: choose/chooseAmong don't work with immutable

https://issues.dlang.org/show_bug.cgi?id=23506

          Issue ID: 23506
           Summary: choose/chooseAmong don't work with immutable
                    referencing structs
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: default_357-line yahoo.de

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.

--
Nov 24 2022