[Issue 20254] New: object.require doesn't work with Variant
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 29 19:53:31 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20254
Issue ID: 20254
Summary: object.require doesn't work with Variant
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: johnch_atms at hotmail.com
The following code produces as error:
Variant[string] aa;
auto value = aa.require("key", Variant("value"));
Output:
`(*p).opAssign(value())` is not an lvalue and cannot be modified
Removing 'ref' from the function's definition allows it to compile but I'm
assuming there's a reason for the ref return.
--
More information about the Digitalmars-d-bugs
mailing list