@@ -236,18 +236,7 @@ Solution::resolveConcreteDeclRef(ValueDecl *decl,
236
236
newFn));
237
237
238
238
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 ()) {
251
240
auto originalFnSubst = cast<AbstractFunctionDecl>(decl)
252
241
->getInterfaceType ()
253
242
->getAs <GenericFunctionType>()
@@ -301,7 +290,7 @@ Solution::resolveConcreteDeclRef(ValueDecl *decl,
301
290
/* genericParams=*/ nullptr , func->getDeclContext (), newFn);
302
291
if (func->isStatic ()) newFnDecl->setStatic ();
303
292
if (func->isImportAsStaticMember ()) newFnDecl->setImportAsStaticMember ();
304
- if (! func->getDeclContext ()-> isModuleScopeContext ()) {
293
+ if (func->getImportAsMemberStatus (). isInstance ()) {
305
294
newFnDecl->setSelfAccessKind (func->getSelfAccessKind ());
306
295
newFnDecl->setSelfIndex (func->getSelfIndex ());
307
296
}
0 commit comments