Skip to content

Commit cbb2374

Browse files
committed
AST: Small cleanup for transformWithPosition()
1 parent 0822460 commit cbb2374

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/AST/Type.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4455,11 +4455,8 @@ case TypeKind::Id:
44554455
auto sig = opaque->getDecl()->getGenericSignature();
44564456
auto newSubMap =
44574457
SubstitutionMap::get(sig,
4458-
[&](SubstitutableType *t) -> Type {
4459-
auto index = sig->getGenericParamOrdinal(cast<GenericTypeParamType>(t));
4460-
return newSubs[index];
4461-
},
4462-
LookUpConformanceInModule(opaque->getDecl()->getModuleContext()));
4458+
QueryReplacementTypeArray{sig, newSubs},
4459+
LookUpConformanceInModule(opaque->getDecl()->getModuleContext()));
44634460
return OpaqueTypeArchetypeType::get(opaque->getDecl(),
44644461
opaque->getInterfaceType(),
44654462
newSubMap);

0 commit comments

Comments
 (0)