Prevent cyclic reference between script and its members

This commit is contained in:
Pedro J. Estébanez 2020-09-09 13:05:28 +02:00
parent 939ed5dd5b
commit a0969662cd
5 changed files with 21 additions and 13 deletions

View file

@ -53,7 +53,8 @@ struct GDScriptDataType {
} kind;
Variant::Type builtin_type;
StringName native_type;
Ref<Script> script_type;
Script *script_type;
Ref<Script> script_type_ref;
bool is_type(const Variant &p_variant, bool p_allow_implicit_conversion = false) const {
if (!has_type) return true; // Can't type check
@ -149,7 +150,8 @@ struct GDScriptDataType {
GDScriptDataType() :
has_type(false),
kind(UNINITIALIZED),
builtin_type(Variant::NIL) {}
builtin_type(Variant::NIL),
script_type(NULL) {}
};
class GDScriptFunction {