mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibSQL: Relax assignment rules for Null Values
It should be possible to assign a Value of any type to a Value which currently is Null.
This commit is contained in:
committed by
Andreas Kling
parent
1c50e9aadc
commit
87f4c1677b
@@ -261,6 +261,8 @@ Value& Value::operator=(Value const& other)
|
||||
if (this != &other) {
|
||||
if (other.is_null()) {
|
||||
assign(null());
|
||||
} else if (is_null()) {
|
||||
assign(other);
|
||||
} else {
|
||||
VERIFY(can_cast(other));
|
||||
assign(other);
|
||||
|
||||
Reference in New Issue
Block a user