summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-23 22:18:55 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-23 22:18:55 +0100
commit77666286b79cc208b2e5b1712c4f4c369406ebfc (patch)
tree25987b6311f43d60b775582928303c1e4a0f46c0 /modules/gdscript/tests
parent4582ee1a0f3447531f8bf65d7e7d74fff7273b40 (diff)
parent081fa324fd11e5602b748bf45717d32692a3e7dc (diff)
downloadredot-engine-77666286b79cc208b2e5b1712c4f4c369406ebfc.tar.gz
Merge pull request #88020 from emre0altan/match-null-crashes-GDScript-compiler
GDScript: Set `has_type` false if it is `BUILTIN` but `Variant::NIL`
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/match_test_null.gd6
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/match_test_null.out2
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/match_test_null.gd b/modules/gdscript/tests/scripts/runtime/features/match_test_null.gd
new file mode 100644
index 0000000000..9bb57b68ee
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/match_test_null.gd
@@ -0,0 +1,6 @@
+func test():
+ match null:
+ null:
+ print('null matched')
+ _:
+ pass
diff --git a/modules/gdscript/tests/scripts/runtime/features/match_test_null.out b/modules/gdscript/tests/scripts/runtime/features/match_test_null.out
new file mode 100644
index 0000000000..7640cf42ab
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/match_test_null.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+null matched