mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03: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
Notes:
sideshowbarker
2024-07-18 02:13:10 +09:00
Author: https://github.com/JanDeVisser Commit: https://github.com/SerenityOS/serenity/commit/87f4c1677bd Pull-request: https://github.com/SerenityOS/serenity/pull/10770 Reviewed-by: https://github.com/trflynn89 ✅
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user