Skip to content

Commit 58c9fdb

Browse files
authored
Clarify null-safety vs type-safety
Changed the statement about the "as" keyword to clarify that it affects null-safety, not type-safety.
1 parent 7b7952a commit 58c9fdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorials/scripting/gdscript/gdscript_styleguide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ that type will be used to infer the type of the var.
10531053

10541054
.. note::
10551055

1056-
This option is considered less :ref:`type-safe<doc_gdscript_static_typing_safe_lines>` than type hints, as it silently casts the variable to null in case of a type mismatch at runtime, without an error/warning
1056+
This option is considered more :ref:`type-safe<doc_gdscript_static_typing_safe_lines>` than type hints, but also less null-safe as it silently casts the variable to null in case of a type mismatch at runtime, without an error/warning.
10571057

10581058
**Bad**:
10591059

0 commit comments

Comments
 (0)