The problem was that the scope of the class declaration in a template-class
declaration is the template, not the scope in which that template is defined.
The scope-check was not taking this into account.
Task-number: QTCREATORBUG-3183
Reviewed-by: Roberto Raggi
}
if (isLocalScope(_declSymbol->enclosingScope()) || isLocalScope(s->enclosingScope())) {
- if (s->enclosingScope() != _declSymbol->enclosingScope())
+ if (s->enclosingScope()->isTemplate()) {
+ if (s->enclosingScope()->enclosingScope() != _declSymbol->enclosingScope())
+ return false;
+ } else if (s->enclosingScope() != _declSymbol->enclosingScope()) {
return false;
+ }
}
if (compareFullyQualifiedName(LookupContext::fullyQualifiedName(s), _declSymbolFullyQualifiedName))