File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1879,8 +1879,7 @@ bool CalleeCandidateInfo::diagnoseGenericParameterErrors(Expr *badArgExpr) {
1879
1879
return false ;
1880
1880
1881
1881
auto getGenericTypeDecl = [&](ArchetypeType *archetype) -> ValueDecl * {
1882
- auto *env = archetype->getGenericEnvironment ();
1883
- auto paramType = env->mapTypeOutOfContext (archetype);
1882
+ auto paramType = archetype->getInterfaceType ();
1884
1883
1885
1884
if (auto *GTPT = paramType->getAs <GenericTypeParamType>())
1886
1885
return GTPT->getDecl ();
@@ -6121,8 +6120,7 @@ bool FailureDiagnosis::diagnoseArgumentGenericRequirements(
6121
6120
return false ;
6122
6121
6123
6122
// Record substitution from generic parameter to the argument type.
6124
- substitutions[env->mapTypeOutOfContext (archetype)
6125
- ->getCanonicalType ()
6123
+ substitutions[archetype->getInterfaceType ()->getCanonicalType ()
6126
6124
->castTo <SubstitutableType>()] = argType;
6127
6125
}
6128
6126
}
You can’t perform that action at this time.
0 commit comments