Commit 1f3ce810 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Check the member access operator before trying to resolve the base expression.

parent 31b632d6
......@@ -609,17 +609,18 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
return retBinding;
}
}
}
if (replacedDotOperator && accessOp == T_DOT) {
if (PointerType *ptrTy = ty->asPointerType()) {
ty = ptrTy->elementType();
*replacedDotOperator = true;
} else if (accessOp == T_DOT) {
if (replacedDotOperator) {
if (PointerType *ptrTy = ty->asPointerType()) {
// replace . with ->
ty = ptrTy->elementType();
*replacedDotOperator = true;
}
}
}
if (ClassOrNamespace *binding = findClass(ty, scope))
return binding;
if (ClassOrNamespace *binding = findClass(ty, scope))
return binding;
}
}
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment