modules/gdscript/tests/scripts/runtime/features/does_not_override_temp_values.gd
raw| 1 | # https://github.com/godotengine/godot/issues/71177 |
| 2 | |
| 3 | func test(): |
| 4 | builtin_method() |
| 5 | builtin_method_static() |
| 6 | print("done") |
| 7 | |
| 8 | func builtin_method(): |
| 9 | var pba := PackedByteArray() |
| 10 | @warning_ignore("return_value_discarded") |
| 11 | pba.resize(1) # Built-in validated. |
| 12 | |
| 13 | |
| 14 | func builtin_method_static(): |
| 15 | var _pba := PackedByteArray() |
| 16 | @warning_ignore("return_value_discarded") |
| 17 | Vector2.from_angle(PI) # Static built-in validated. |