QmlJs: fix false positives for properties

Resolve references while looking up for object members.

Task-number: QTCREATORBUG-18362
Change-Id: I9d2b2457fb3488c723a41e4e8ba1fc0ea9fe800f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Benelli
2017-08-09 17:16:06 +02:00
committed by Thomas Hartmann
parent e45c6ebe4b
commit 73834060d7

View File

@@ -1781,6 +1781,9 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
addMessage(ErrInvalidMember, idPart->identifierToken, propertyName, objectValue->className());
return 0;
}
// resolve references
if (const Reference *ref = value->asReference())
value = _context->lookupReference(ref);
}
return value;