@@ -236,18 +236,7 @@ Solution::resolveConcreteDeclRef(ValueDecl *decl,
236236 newFn));
237237
238238 if (auto fn = dyn_cast<AbstractFunctionDecl>(newDecl)) {
239- // On Windows x86-64 we have to hack around the fact that
240- // Int -> long long -> Int64. So we re-write the parameters mapping
241- // Int64 -> Int.
242- auto triple = decl->getASTContext ().LangOpts .Target ;
243- if (triple.isOSWindows () && triple.isArch64Bit () &&
244- !triple.isWindowsCygwinEnvironment () &&
245- // Make sure we're substituting in at least one Int or UInt
246- // (technically not necessary).
247- llvm::any_of (subst.getReplacementTypes (), [](Type t) {
248- return t->isEqual (t->getASTContext ().getIntType ()) ||
249- t->isEqual (t->getASTContext ().getUIntType ());
250- })) {
239+ if (!subst.empty ()) {
251240 auto originalFnSubst = cast<AbstractFunctionDecl>(decl)
252241 ->getInterfaceType ()
253242 ->getAs <GenericFunctionType>()
@@ -301,7 +290,7 @@ Solution::resolveConcreteDeclRef(ValueDecl *decl,
301290 /* genericParams=*/ nullptr , func->getDeclContext (), newFn);
302291 if (func->isStatic ()) newFnDecl->setStatic ();
303292 if (func->isImportAsStaticMember ()) newFnDecl->setImportAsStaticMember ();
304- if (! func->getDeclContext ()-> isModuleScopeContext ()) {
293+ if (func->getImportAsMemberStatus (). isInstance ()) {
305294 newFnDecl->setSelfAccessKind (func->getSelfAccessKind ());
306295 newFnDecl->setSelfIndex (func->getSelfIndex ());
307296 }
0 commit comments