Skip to content
Snippets Groups Projects
Commit 9ed1f667 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Resolve ambiguous C++-like initilized declarations.

parent 517e04ff
No related branches found
No related tags found
No related merge requests found
...@@ -570,9 +570,8 @@ bool ResolveExpression::visit(MemberAccessAST *ast) ...@@ -570,9 +570,8 @@ bool ResolveExpression::visit(MemberAccessAST *ast)
ClassOrNamespace *ResolveExpression::findClass(const FullySpecifiedType &originalTy, Scope *scope) const ClassOrNamespace *ResolveExpression::findClass(const FullySpecifiedType &originalTy, Scope *scope) const
{ {
ClassOrNamespace *binding = 0;
FullySpecifiedType ty = originalTy.simplified(); FullySpecifiedType ty = originalTy.simplified();
ClassOrNamespace *binding = 0;
if (Class *klass = ty->asClassType()) if (Class *klass = ty->asClassType())
binding = _context.classOrNamespace(klass); binding = _context.classOrNamespace(klass);
...@@ -580,6 +579,9 @@ ClassOrNamespace *ResolveExpression::findClass(const FullySpecifiedType &origina ...@@ -580,6 +579,9 @@ ClassOrNamespace *ResolveExpression::findClass(const FullySpecifiedType &origina
else if (NamedType *namedTy = ty->asNamedType()) else if (NamedType *namedTy = ty->asNamedType())
binding = _context.classOrNamespace(namedTy->name(), scope); binding = _context.classOrNamespace(namedTy->name(), scope);
else if (Function *funTy = ty->asFunctionType())
return findClass(funTy->returnType(), scope);
return binding; return binding;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment