summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/not_found_type.gd3
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/global_enums.gd30
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/global_enums.out9
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.gd10
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/script_typed_assign_null.gd18
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/script_typed_assign_null.out7
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/type_test_usage.gd127
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/type_test_usage.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out2
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd16
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference.out1
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd2
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/typed_argument_is_null.gd27
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/typed_argument_is_null.out3
29 files changed, 273 insertions, 14 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out
index ddbdc17a42..1b6e11f6f2 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot find member "V3" in base "enum_bad_value.gd::Enum".
+Cannot find member "V3" in base "enum_bad_value.gd.Enum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out
index 84958f1aa2..d401675bcf 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_class_var_assign_with_wrong_enum_type.gd::MyOtherEnum" as "enum_class_var_assign_with_wrong_enum_type.gd::MyEnum".
+Cannot assign a value of type "enum_class_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_assign_with_wrong_enum_type.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out
index e294f3496a..4b6b42b024 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_class_var_init_with_wrong_enum_type.gd::MyOtherEnum" as "enum_class_var_init_with_wrong_enum_type.gd::MyEnum".
+Cannot assign a value of type "enum_class_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_init_with_wrong_enum_type.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out
index a91189e2dd..adde630a0b 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot pass a value of type "enum_function_parameter_wrong_type.gd::MyOtherEnum" as "enum_function_parameter_wrong_type.gd::MyEnum".
+Cannot pass a value of type "enum_function_parameter_wrong_type.gd.MyOtherEnum" as "enum_function_parameter_wrong_type.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out
index 6b4eba3740..9ee3fb7c06 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot return a value of type "enum_function_return_wrong_type.gd::MyOtherEnum" as "enum_function_return_wrong_type.gd::MyEnum".
+Cannot return a value of type "enum_function_return_wrong_type.gd.MyOtherEnum" as "enum_function_return_wrong_type.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out
index 616358bb61..8de7bde50d 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_local_var_assign_outer_with_wrong_enum_type.gd::InnerClass::MyEnum" as "enum_local_var_assign_outer_with_wrong_enum_type.gd::MyEnum".
+Cannot assign a value of type "enum_local_var_assign_outer_with_wrong_enum_type.gd::InnerClass.MyEnum" as "enum_local_var_assign_outer_with_wrong_enum_type.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out
index af3dde663f..e2139e75f6 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_local_var_assign_with_wrong_enum_type.gd::MyOtherEnum" as "enum_local_var_assign_with_wrong_enum_type.gd::MyEnum".
+Cannot assign a value of type "enum_local_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_assign_with_wrong_enum_type.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out
index 781b0bc85f..46c0553c28 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_local_var_init_with_wrong_enum_type.gd::MyOtherEnum" as "enum_local_var_init_with_wrong_enum_type.gd::MyEnum".
+Cannot assign a value of type "enum_local_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_init_with_wrong_enum_type.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out
index 49f041a2dd..4b1db77a35 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot find member "THIS_DOES_NOT_EXIST" in base "TileSet::TileShape".
+Cannot find member "THIS_DOES_NOT_EXIST" in base "TileSet.TileShape".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out
index e8c7f86c4f..ddd26e7399 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_value_from_parent.gd::<anonymous enum>" as "enum_preload_unnamed_assign_to_named.gd::MyEnum".
+Cannot assign a value of type "enum_value_from_parent.gd.<anonymous enum>" as "enum_preload_unnamed_assign_to_named.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out
index fb18c94d0b..3a65978aa3 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_unnamed_assign_to_named.gd::<anonymous enum>" as "enum_unnamed_assign_to_named.gd::MyEnum".
+Cannot assign a value of type "enum_unnamed_assign_to_named.gd.<anonymous enum>" as "enum_unnamed_assign_to_named.gd.MyEnum".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.gd b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.gd
new file mode 100644
index 0000000000..1644295b38
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.gd
@@ -0,0 +1,3 @@
+func test():
+ var foo: Foo
+ print('not ok')
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out
new file mode 100644
index 0000000000..3f6c2d868d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Could not find type "Foo" in the current scope.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out b/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out
index 08a973503f..21143f2ade 100644
--- a/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_from_outer.gd::Named" as "preload_enum_error.gd::LocalNamed".
+Cannot assign a value of type "enum_from_outer.gd.Named" as "preload_enum_error.gd.LocalNamed".
diff --git a/modules/gdscript/tests/scripts/analyzer/features/global_enums.gd b/modules/gdscript/tests/scripts/analyzer/features/global_enums.gd
new file mode 100644
index 0000000000..67d48817e8
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/global_enums.gd
@@ -0,0 +1,30 @@
+func test():
+ var type: Variant.Type
+ type = Variant.Type.TYPE_INT
+ print(type)
+ type = TYPE_FLOAT
+ print(type)
+
+ var direction: ClockDirection
+ direction = ClockDirection.CLOCKWISE
+ print(direction)
+ direction = COUNTERCLOCKWISE
+ print(direction)
+
+ var duper := Duper.new()
+ duper.set_type(Variant.Type.TYPE_INT)
+ duper.set_type(TYPE_FLOAT)
+ duper.set_direction(ClockDirection.CLOCKWISE)
+ duper.set_direction(COUNTERCLOCKWISE)
+
+class Super:
+ func set_type(type: Variant.Type) -> void:
+ print(type)
+ func set_direction(dir: ClockDirection) -> void:
+ print(dir)
+
+class Duper extends Super:
+ func set_type(type: Variant.Type) -> void:
+ print(type)
+ func set_direction(dir: ClockDirection) -> void:
+ print(dir)
diff --git a/modules/gdscript/tests/scripts/analyzer/features/global_enums.out b/modules/gdscript/tests/scripts/analyzer/features/global_enums.out
new file mode 100644
index 0000000000..b3b5bf57c1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/global_enums.out
@@ -0,0 +1,9 @@
+GDTEST_OK
+2
+3
+0
+1
+2
+3
+0
+1
diff --git a/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.gd b/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.gd
new file mode 100644
index 0000000000..6c056530f6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.gd
@@ -0,0 +1,10 @@
+func test():
+ print("ok")
+
+# https://github.com/godotengine/godot/issues/71994
+class A:
+ extends RefCounted
+class B:
+ extends A
+ func duplicate():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.out b/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.out
new file mode 100644
index 0000000000..1b47ed10dc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+ok
diff --git a/modules/gdscript/tests/scripts/analyzer/features/script_typed_assign_null.gd b/modules/gdscript/tests/scripts/analyzer/features/script_typed_assign_null.gd
new file mode 100644
index 0000000000..1b47680a7b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/script_typed_assign_null.gd
@@ -0,0 +1,18 @@
+extends Node
+
+class LocalClass extends Node:
+ pass
+
+func test():
+ var typed: LocalClass = get_node_or_null("does_not_exist")
+ var untyped = null
+ var node_1: LocalClass = typed
+ var node_2: LocalClass = untyped
+ var node_3 = typed
+ var node_4 = untyped
+ print(typed)
+ print(untyped)
+ print(node_1)
+ print(node_2)
+ print(node_3)
+ print(node_4)
diff --git a/modules/gdscript/tests/scripts/analyzer/features/script_typed_assign_null.out b/modules/gdscript/tests/scripts/analyzer/features/script_typed_assign_null.out
new file mode 100644
index 0000000000..d66b72f5c3
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/script_typed_assign_null.out
@@ -0,0 +1,7 @@
+GDTEST_OK
+<Object#null>
+<null>
+<Object#null>
+<null>
+<Object#null>
+<null>
diff --git a/modules/gdscript/tests/scripts/analyzer/features/type_test_usage.gd b/modules/gdscript/tests/scripts/analyzer/features/type_test_usage.gd
new file mode 100644
index 0000000000..12dc0b93df
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/type_test_usage.gd
@@ -0,0 +1,127 @@
+class A extends RefCounted:
+ pass
+
+class B extends A:
+ pass
+
+@warning_ignore("assert_always_true")
+func test():
+ var builtin: Variant = 3
+ assert((builtin is Variant) == true)
+ assert((builtin is int) == true)
+ assert(is_instance_of(builtin, TYPE_INT) == true)
+ assert((builtin is float) == false)
+ assert(is_instance_of(builtin, TYPE_FLOAT) == false)
+
+ const const_builtin: Variant = 3
+ assert((const_builtin is Variant) == true)
+ assert((const_builtin is int) == true)
+ assert(is_instance_of(const_builtin, TYPE_INT) == true)
+ assert((const_builtin is float) == false)
+ assert(is_instance_of(const_builtin, TYPE_FLOAT) == false)
+
+ var int_array: Variant = [] as Array[int]
+ assert((int_array is Variant) == true)
+ assert((int_array is Array) == true)
+ assert(is_instance_of(int_array, TYPE_ARRAY) == true)
+ assert((int_array is Array[int]) == true)
+ assert((int_array is Array[float]) == false)
+ assert((int_array is int) == false)
+ assert(is_instance_of(int_array, TYPE_INT) == false)
+
+ var const_int_array: Variant = [] as Array[int]
+ assert((const_int_array is Variant) == true)
+ assert((const_int_array is Array) == true)
+ assert(is_instance_of(const_int_array, TYPE_ARRAY) == true)
+ assert((const_int_array is Array[int]) == true)
+ assert((const_int_array is Array[float]) == false)
+ assert((const_int_array is int) == false)
+ assert(is_instance_of(const_int_array, TYPE_INT) == false)
+
+ var b_array: Variant = [] as Array[B]
+ assert((b_array is Variant) == true)
+ assert((b_array is Array) == true)
+ assert(is_instance_of(b_array, TYPE_ARRAY) == true)
+ assert((b_array is Array[B]) == true)
+ assert((b_array is Array[A]) == false)
+ assert((b_array is Array[int]) == false)
+ assert((b_array is int) == false)
+ assert(is_instance_of(b_array, TYPE_INT) == false)
+
+ var const_b_array: Variant = [] as Array[B]
+ assert((const_b_array is Variant) == true)
+ assert((const_b_array is Array) == true)
+ assert(is_instance_of(const_b_array, TYPE_ARRAY) == true)
+ assert((const_b_array is Array[B]) == true)
+ assert((const_b_array is Array[A]) == false)
+ assert((const_b_array is Array[int]) == false)
+ assert((const_b_array is int) == false)
+ assert(is_instance_of(const_b_array, TYPE_INT) == false)
+
+ var native: Variant = RefCounted.new()
+ assert((native is Variant) == true)
+ assert((native is Object) == true)
+ assert(is_instance_of(native, TYPE_OBJECT) == true)
+ assert(is_instance_of(native, Object) == true)
+ assert((native is RefCounted) == true)
+ assert(is_instance_of(native, RefCounted) == true)
+ assert((native is Node) == false)
+ assert(is_instance_of(native, Node) == false)
+ assert((native is int) == false)
+ assert(is_instance_of(native, TYPE_INT) == false)
+
+ var a_script: Variant = A.new()
+ assert((a_script is Variant) == true)
+ assert((a_script is Object) == true)
+ assert(is_instance_of(a_script, TYPE_OBJECT) == true)
+ assert(is_instance_of(a_script, Object) == true)
+ assert((a_script is RefCounted) == true)
+ assert(is_instance_of(a_script, RefCounted) == true)
+ assert((a_script is A) == true)
+ assert(is_instance_of(a_script, A) == true)
+ assert((a_script is B) == false)
+ assert(is_instance_of(a_script, B) == false)
+ assert((a_script is Node) == false)
+ assert(is_instance_of(a_script, Node) == false)
+ assert((a_script is int) == false)
+ assert(is_instance_of(a_script, TYPE_INT) == false)
+
+ var b_script: Variant = B.new()
+ assert((b_script is Variant) == true)
+ assert((b_script is Object) == true)
+ assert(is_instance_of(b_script, TYPE_OBJECT) == true)
+ assert(is_instance_of(b_script, Object) == true)
+ assert((b_script is RefCounted) == true)
+ assert(is_instance_of(b_script, RefCounted) == true)
+ assert((b_script is A) == true)
+ assert(is_instance_of(b_script, A) == true)
+ assert((b_script is B) == true)
+ assert(is_instance_of(b_script, B) == true)
+ assert((b_script is Node) == false)
+ assert(is_instance_of(b_script, Node) == false)
+ assert((b_script is int) == false)
+ assert(is_instance_of(b_script, TYPE_INT) == false)
+
+ var var_null: Variant = null
+ assert((var_null is Variant) == true)
+ assert((var_null is int) == false)
+ assert(is_instance_of(var_null, TYPE_INT) == false)
+ assert((var_null is Object) == false)
+ assert(is_instance_of(var_null, TYPE_OBJECT) == false)
+ assert((var_null is RefCounted) == false)
+ assert(is_instance_of(var_null, RefCounted) == false)
+ assert((var_null is A) == false)
+ assert(is_instance_of(var_null, A) == false)
+
+ const const_null: Variant = null
+ assert((const_null is Variant) == true)
+ assert((const_null is int) == false)
+ assert(is_instance_of(const_null, TYPE_INT) == false)
+ assert((const_null is Object) == false)
+ assert(is_instance_of(const_null, TYPE_OBJECT) == false)
+ assert((const_null is RefCounted) == false)
+ assert(is_instance_of(const_null, RefCounted) == false)
+ assert((const_null is A) == false)
+ assert(is_instance_of(const_null, A) == false)
+
+ print('ok')
diff --git a/modules/gdscript/tests/scripts/analyzer/features/type_test_usage.out b/modules/gdscript/tests/scripts/analyzer/features/type_test_usage.out
new file mode 100644
index 0000000000..1b47ed10dc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/type_test_usage.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+ok
diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out b/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out
index 6e086a0918..6d8aeaf0b6 100644
--- a/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out
+++ b/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out
@@ -2,5 +2,5 @@ GDTEST_OK
>> WARNING
>> Line: 5
>> INT_AS_ENUM_WITHOUT_MATCH
->> Cannot cast 2 as Enum "cast_enum_bad_enum.gd::MyEnum": no enum member has matching value.
+>> Cannot cast 2 as Enum "cast_enum_bad_enum.gd.MyEnum": no enum member has matching value.
2
diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out b/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out
index c19d57f98e..b0e4af29a0 100644
--- a/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out
+++ b/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out
@@ -2,5 +2,5 @@ GDTEST_OK
>> WARNING
>> Line: 4
>> INT_AS_ENUM_WITHOUT_MATCH
->> Cannot cast 2 as Enum "cast_enum_bad_int.gd::MyEnum": no enum member has matching value.
+>> Cannot cast 2 as Enum "cast_enum_bad_int.gd.MyEnum": no enum member has matching value.
2
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd
new file mode 100644
index 0000000000..c7553769da
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd
@@ -0,0 +1,16 @@
+# https://github.com/godotengine/godot/issues/61636
+
+const External := preload("const_class_reference_external.notest.gd")
+
+class Class1:
+ class Class2:
+ pass
+
+const Class1Alias = Class1
+const Class1Class2Alias = Class1.Class2
+
+const ExternalAlias = External
+const ExternalClassAlias = External.Class
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd b/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd
new file mode 100644
index 0000000000..050e8a0960
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd
@@ -0,0 +1,2 @@
+class Class:
+ pass
diff --git a/modules/gdscript/tests/scripts/runtime/features/typed_argument_is_null.gd b/modules/gdscript/tests/scripts/runtime/features/typed_argument_is_null.gd
new file mode 100644
index 0000000000..277242156d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/typed_argument_is_null.gd
@@ -0,0 +1,27 @@
+# https://github.com/godotengine/godot/issues/72967
+
+class CustomNode:
+ extends Node
+
+ static func test_custom_node(n: CustomNode):
+ if not n:
+ print("null node")
+
+func test():
+ test_typed_argument_is_null()
+
+func get_custom_node() -> CustomNode:
+ return null
+
+func test_typed_argument_is_null():
+ var node: Node = Node.new()
+ print_node_name(node.get_parent())
+ node.free()
+ test_custom_node()
+
+func test_custom_node():
+ CustomNode.test_custom_node(get_custom_node())
+
+func print_node_name(n: Node):
+ if not n:
+ print("null node")
diff --git a/modules/gdscript/tests/scripts/runtime/features/typed_argument_is_null.out b/modules/gdscript/tests/scripts/runtime/features/typed_argument_is_null.out
new file mode 100644
index 0000000000..41560003d6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/typed_argument_is_null.out
@@ -0,0 +1,3 @@
+GDTEST_OK
+null node
+null node