diff options
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.gd | 17 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.out | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.gd b/modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.gd new file mode 100644 index 0000000000..1d4b400d81 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.gd @@ -0,0 +1,17 @@ +# https://github.com/godotengine/godot/issues/71177 + +func test(): + builtin_method() + builtin_method_static() + print("done") + +func builtin_method(): + var pba := PackedByteArray() + @warning_ignore(return_value_discarded) + pba.resize(1) # Built-in validated. + + +func builtin_method_static(): + var _pba := PackedByteArray() + @warning_ignore(return_value_discarded) + Vector2.from_angle(PI) # Static built-in validated. diff --git a/modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.out b/modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.out new file mode 100644 index 0000000000..8e68c97774 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.out @@ -0,0 +1,2 @@ +GDTEST_OK +done |