Bug 20254 – object.require doesn't work with Variant

Status
NEW
Severity
enhancement
Priority
P4
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-09-29T19:53:31Z
Last change time
2024-12-07T13:39:41Z
Assigned to
No Owner
Creator
John Chapman
Moved to GitHub: dmd#17182 →

Comments

Comment #0 by johnch_atms — 2019-09-29T19:53:31Z
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.
Comment #1 by robert.schadek — 2024-12-07T13:39:41Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17182 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB