forked from qt-creator/qt-creator
Resolve ambiguous C++-like initilized declarations.
This commit is contained in:
@@ -570,9 +570,8 @@ bool ResolveExpression::visit(MemberAccessAST *ast)
|
||||
|
||||
ClassOrNamespace *ResolveExpression::findClass(const FullySpecifiedType &originalTy, Scope *scope) const
|
||||
{
|
||||
ClassOrNamespace *binding = 0;
|
||||
|
||||
FullySpecifiedType ty = originalTy.simplified();
|
||||
ClassOrNamespace *binding = 0;
|
||||
|
||||
if (Class *klass = ty->asClassType())
|
||||
binding = _context.classOrNamespace(klass);
|
||||
@@ -580,6 +579,9 @@ ClassOrNamespace *ResolveExpression::findClass(const FullySpecifiedType &origina
|
||||
else if (NamedType *namedTy = ty->asNamedType())
|
||||
binding = _context.classOrNamespace(namedTy->name(), scope);
|
||||
|
||||
else if (Function *funTy = ty->asFunctionType())
|
||||
return findClass(funTy->returnType(), scope);
|
||||
|
||||
return binding;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user