digitalmars.D.bugs - [Issue 20175] New: Nullable!T.get(x) immutable array elements
- d-bugmail puremagic.com (22/22) Aug 27 2019 https://issues.dlang.org/show_bug.cgi?id=20175
https://issues.dlang.org/show_bug.cgi?id=20175 Issue ID: 20175 Summary: Nullable!T.get(x) immutable array elements downgraded to const Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: elpenguino+D gmail.com ``` import std.typecons : Nullable; Nullable!string x; static assert(is(typeof(x.get()) == string)); //OK! static assert(is(typeof(x.get("")) == string)); //UH OH ``` We get const(char)[] instead of the expected string. --
Aug 27 2019