Merge pull request #117545 from EdwardChanCH/tooltip_local_var_hides_global_v2
Fix inconsistent tooltip for `@GlobalScope` constants
This commit is contained in:
@@ -4317,13 +4317,6 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
|
||||
return OK;
|
||||
}
|
||||
|
||||
if (p_symbol == "PI" || p_symbol == "TAU" || p_symbol == "INF" || p_symbol == "NAN") {
|
||||
r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_CONSTANT;
|
||||
r_result.class_name = "@GDScript";
|
||||
r_result.class_member = p_symbol;
|
||||
return OK;
|
||||
}
|
||||
|
||||
GDScriptParser parser;
|
||||
parser.parse(p_code, p_path, true);
|
||||
|
||||
@@ -4539,6 +4532,13 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
|
||||
}
|
||||
}
|
||||
|
||||
if (p_symbol == "PI" || p_symbol == "TAU" || p_symbol == "INF" || p_symbol == "NAN") {
|
||||
r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_CONSTANT;
|
||||
r_result.class_name = "@GDScript";
|
||||
r_result.class_member = p_symbol;
|
||||
return OK;
|
||||
}
|
||||
|
||||
if (CoreConstants::is_global_enum(p_symbol)) {
|
||||
r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_ENUM;
|
||||
r_result.class_name = "@GlobalScope";
|
||||
|
||||
Reference in New Issue
Block a user