line unsafe for indexing with known base type & unkown identifier

This commit is contained in:
Thakee Nathees 2020-04-17 12:13:57 +05:30
parent c9de04b628
commit 0780ad2800
1 changed files with 1 additions and 0 deletions

View File

@ -6562,6 +6562,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