You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
GDScript: Properly validate return type
When the type cannot be validated at compile time, the runtime must do a check to ensure type safety is kept, as the code might be assuming the return type is correct in another place, leading to crashes if the contract is broken.
This commit is contained in:
@@ -306,6 +306,10 @@ public:
|
||||
OPCODE_JUMP_IF_NOT,
|
||||
OPCODE_JUMP_TO_DEF_ARGUMENT,
|
||||
OPCODE_RETURN,
|
||||
OPCODE_RETURN_TYPED_BUILTIN,
|
||||
OPCODE_RETURN_TYPED_ARRAY,
|
||||
OPCODE_RETURN_TYPED_NATIVE,
|
||||
OPCODE_RETURN_TYPED_SCRIPT,
|
||||
OPCODE_ITERATE_BEGIN,
|
||||
OPCODE_ITERATE_BEGIN_INT,
|
||||
OPCODE_ITERATE_BEGIN_FLOAT,
|
||||
|
||||
Reference in New Issue
Block a user