Browse Source

line unsafe for indexing with known base type & unkown identifier

(cherry picked from commit 0780ad2800aeeb26c02871d0a6242f68097c69b2)
Thakee Nathees 5 years ago
parent
commit
12c776dba3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      modules/gdscript/gdscript_parser.cpp

+ 1 - 0
modules/gdscript/gdscript_parser.cpp

@@ -6569,6 +6569,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
 							node_type = _reduce_identifier_type(&base_type, member_id->name, op->line, true);
 #ifdef DEBUG_ENABLED
 							if (!node_type.has_type) {
+								_mark_line_as_unsafe(op->line);
 								_add_warning(GDScriptWarning::UNSAFE_PROPERTY_ACCESS, op->line, member_id->name.operator String(), base_type.to_string());
 							}
 #endif // DEBUG_ENABLED