diff options
| author | George Marques <george@gmarqu.es> | 2021-09-02 08:25:02 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-02 08:25:02 -0300 |
| commit | 29a3300c6aaa2c7915c39ad633dc3b0ce0a8505b (patch) | |
| tree | 57c7b458b33bb1ef77334c8d3d0a8419c604b166 /modules/gdscript/gdscript_analyzer.h | |
| parent | d4a84be4fb91ef425b4ca55f3d24464bbd9906c9 (diff) | |
| parent | 84852585b96623fef89576898f5c5f4ae173108b (diff) | |
| download | redot-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.h | 6 |
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); |
