File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -368,15 +368,15 @@ static bool collectPossibleCalleesForApply(
368368
369369 if (auto *DRE = dyn_cast<DeclRefExpr>(fnExpr)) {
370370 if (auto *decl = DRE->getDecl ()) {
371- auto declType = decl->getInterfaceType ();
372- if (auto *funcType = declType ->getAs <AnyFunctionType>())
373- candidates.emplace_back (funcType, decl);
371+ if ( decl->hasInterfaceType ())
372+ if (auto *funcType = decl-> getInterfaceType () ->getAs <AnyFunctionType>())
373+ candidates.emplace_back (funcType, decl);
374374 }
375375 } else if (auto *OSRE = dyn_cast<OverloadSetRefExpr>(fnExpr)) {
376376 for (auto *decl : OSRE->getDecls ()) {
377- auto declType = decl->getInterfaceType ();
378- if (auto *funcType = declType ->getAs <AnyFunctionType>())
379- candidates.emplace_back (funcType, decl);
377+ if ( decl->hasInterfaceType ())
378+ if (auto *funcType = decl-> getInterfaceType () ->getAs <AnyFunctionType>())
379+ candidates.emplace_back (funcType, decl);
380380 }
381381 } else if (auto *UDE = dyn_cast<UnresolvedDotExpr>(fnExpr)) {
382382 collectPossibleCalleesByQualifiedLookup (
You can’t perform that action at this time.
0 commit comments