[Issue 23640] New: Nullable range iteration doesn't work with immutable values
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 19 07:19:26 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23640
Issue ID: 23640
Summary: Nullable range iteration doesn't work with immutable
values
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
import std;
immutable struct S {
int[] a;
}
void main() {
Nullable!S a = Nullable!S(S([3].idup));
writefln!"%s"(a.array);
}
Expected: [S([3])]
Got: Error: none of the overloads of template `std.array.array` are callable
using argument types `!()(Nullable!(immutable(S)))`
--
More information about the Digitalmars-d-bugs
mailing list