Commit 9ed1f667 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Resolve ambiguous C++-like initilized declarations.

parent 517e04ff
......@@ -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;
}
......
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