1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScript: Forbid implicit type conversion

Since types are not present in release builds, this could cause issues
where a variable does not have the exact defined type.
This commit is contained in:
George Marques
2019-03-03 22:25:22 -03:00
parent a1e73dcc94
commit d0b08342b8
4 changed files with 16 additions and 110 deletions

View File

@@ -607,7 +607,7 @@ private:
Variant::Operator _get_variant_operation(const OperatorNode::Operator &p_op) const;
bool _get_function_signature(DataType &p_base_type, const StringName &p_function, DataType &r_return_type, List<DataType> &r_arg_types, int &r_default_arg_count, bool &r_static, bool &r_vararg) const;
bool _get_member_type(const DataType &p_base_type, const StringName &p_member, DataType &r_member_type) const;
bool _is_type_compatible(const DataType &p_container, const DataType &p_expression, bool p_allow_implicit_conversion = false) const;
bool _is_type_compatible(const DataType &p_container, const DataType &p_expression) const;
DataType _reduce_node_type(Node *p_node);
DataType _reduce_function_call_type(const OperatorNode *p_call);