From c47fb55ba4403ad18525c8bfea0891b2132df254 Mon Sep 17 00:00:00 2001 From: 0stam Date: Sat, 17 Aug 2024 23:27:18 +0200 Subject: [PATCH] Use the newly introduced ``is not`` operator --- tutorials/scripting/gdscript/static_typing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/scripting/gdscript/static_typing.rst b/tutorials/scripting/gdscript/static_typing.rst index 5cfd0b0720ce..ddce7d607fc2 100644 --- a/tutorials/scripting/gdscript/static_typing.rst +++ b/tutorials/scripting/gdscript/static_typing.rst @@ -260,7 +260,7 @@ get full autocompletion on the player variable thanks to that cast. in some cases, it can also lead to bugs. Use the ``as`` keyword only if this behavior is intended. A safer alternative is to use the ``is`` keyword:: - if not (body is PlayerController): + if body is not PlayerController: push_error("Bug: body is not PlayerController.") var player: PlayerController = body