if (parentObject == null) { // index == 0
if (substitutionCandidate.isObject()) {
resolveWithScopeParentLookup(objectType, substitutionCandidate);
} else if (substitutionCandidate.isAlias()) {
PsiLookupAdapter lookupAdapter = new AliasDefinitionLookupAdapter(this, objectType, ref.getText());
BasePsiElement referencedElement = lookupAdapter.findInParentScopeOf(this);
if (referencedElement != this && isValidReference(referencedElement)) {
setElementType(parseVariantElementType);
ref.setReferencedElement(referencedElement);
ref.setParent(null);
}