GDScript: Fix crash caused by inconsistent get_member

This commit is contained in:
Lyuma 2020-07-29 02:54:15 -07:00
parent 3890638d84
commit 68566b7bec
1 changed files with 1 additions and 1 deletions

View File

@ -2019,7 +2019,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
GDScriptParser::ClassNode *outer = base_class->outer; GDScriptParser::ClassNode *outer = base_class->outer;
while (outer != nullptr) { while (outer != nullptr) {
if (outer->has_member(name)) { if (outer->has_member(name)) {
const GDScriptParser::ClassNode::Member &member = base_class->get_member(name); const GDScriptParser::ClassNode::Member &member = outer->get_member(name);
if (member.type == GDScriptParser::ClassNode::Member::CONSTANT) { if (member.type == GDScriptParser::ClassNode::Member::CONSTANT) {
// TODO: Make sure loops won't cause problem. And make special error message for those. // TODO: Make sure loops won't cause problem. And make special error message for those.
// For out-of-order resolution: // For out-of-order resolution: