forked from qt-creator/qt-creator
CppEditor: Fix switch statement completion
... for the case where the value is retrieved via a call to a template function whose scope does not include the template type. Fixes: QTCREATORBUG-25998 Change-Id: Ie33817f445fb53595b783f716093637926297549 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -910,7 +910,7 @@ bool ResolveExpression::visit(CallAST *ast)
|
||||
if (Symbol *declaration = templateTy->declaration()) {
|
||||
if (Function *funTy = declaration->asFunction()) {
|
||||
if (maybeValidPrototype(funTy, actualArgumentCount))
|
||||
addResult(funTy->returnType().simplified(), scope);
|
||||
addResult(funTy->returnType().simplified(), _scope);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user