summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.h
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2021-09-02 08:25:02 -0300
committerGitHub <noreply@github.com>2021-09-02 08:25:02 -0300
commit29a3300c6aaa2c7915c39ad633dc3b0ce0a8505b (patch)
tree57c7b458b33bb1ef77334c8d3d0a8419c604b166 /modules/gdscript/gdscript_analyzer.h
parentd4a84be4fb91ef425b4ca55f3d24464bbd9906c9 (diff)
parent84852585b96623fef89576898f5c5f4ae173108b (diff)
downloadredot-engine-29a3300c6aaa2c7915c39ad633dc3b0ce0a8505b.tar.gz
Merge pull request #52071 from V-Sekai/gdscript_name_conflict_check
Checks in analyzer and compiler for GDScript naming conflicts
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.h')
-rw-r--r--modules/gdscript/gdscript_analyzer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.h b/modules/gdscript/gdscript_analyzer.h
index 32bf049fa1..2e17e15452 100644
--- a/modules/gdscript/gdscript_analyzer.h
+++ b/modules/gdscript/gdscript_analyzer.h
@@ -44,6 +44,12 @@ class GDScriptAnalyzer {
const GDScriptParser::EnumNode *current_enum = nullptr;
List<const GDScriptParser::LambdaNode *> lambda_stack;
+ // Tests for detecting invalid overloading of script members
+ static _FORCE_INLINE_ bool has_member_name_conflict_in_script_class(const StringName &p_name, const GDScriptParser::ClassNode *p_current_class_node);
+ static _FORCE_INLINE_ bool has_member_name_conflict_in_native_type(const StringName &p_name, const StringName &p_native_type_string);
+ Error check_native_member_name_conflict(const StringName &p_member_name, const GDScriptParser::Node *p_member_node, const StringName &p_native_type_string);
+ Error check_class_member_name_conflict(const GDScriptParser::ClassNode *p_class_node, const StringName &p_member_name, const GDScriptParser::Node *p_member_node);
+
Error resolve_inheritance(GDScriptParser::ClassNode *p_class, bool p_recursive = true);
GDScriptParser::DataType resolve_datatype(GDScriptParser::TypeNode *p_type);