mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +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:
parent
1c50e9aadc
commit
87f4c1677b
1 changed files with 2 additions and 0 deletions
|
@ -261,6 +261,8 @@ Value& Value::operator=(Value const& other)
|
||||||
if (this != &other) {
|
if (this != &other) {
|
||||||
if (other.is_null()) {
|
if (other.is_null()) {
|
||||||
assign(null());
|
assign(null());
|
||||||
|
} else if (is_null()) {
|
||||||
|
assign(other);
|
||||||
} else {
|
} else {
|
||||||
VERIFY(can_cast(other));
|
VERIFY(can_cast(other));
|
||||||
assign(other);
|
assign(other);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue