From 3acbf8e71f15c682bcf4fee248f58180e689df1c Mon Sep 17 00:00:00 2001 From: eska Date: Sun, 5 Jun 2016 14:52:07 +0200 Subject: Fix implicit GDScript Reference inheritance --- modules/gdscript/gd_compiler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/gdscript/gd_compiler.cpp') diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index d51f1a4ddc..072c53fb9f 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -1588,6 +1588,12 @@ Error GDCompiler::_parse_class(GDScript *p_script, GDScript *p_owner, const GDPa } + } else { + // without extends, implicitly extend Reference + int native_idx = GDScriptLanguage::get_singleton()->get_global_map()["Reference"]; + native = GDScriptLanguage::get_singleton()->get_global_array()[native_idx]; + ERR_FAIL_COND_V(native.is_null(), ERR_BUG); + p_script->native=native; } -- cgit v1.2.3