[Issue 23506] New: choose/chooseAmong don't work with immutable referencing structs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 24 10:39:01 UTC 2022


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 at puremagic.com
          Reporter: default_357-line at 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.

--


More information about the Digitalmars-d-bugs mailing list