We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8fe36d commit 62d8670Copy full SHA for 62d8670
lib/AST/GenericEnvironment.cpp
@@ -734,10 +734,11 @@ GenericEnvironment::mapElementTypeIntoPackContext(Type type) const {
734
735
type = type->mapTypeOutOfContext();
736
737
+ auto interfaceType = element->getInterfaceType();
738
+
739
llvm::SmallDenseMap<GenericParamKey, GenericTypeParamType *>
740
packParamForElement;
- auto elementDepth =
- sig.getInnermostGenericParams().front()->getDepth() + 1;
741
+ auto elementDepth = interfaceType->getRootGenericParam()->getDepth();
742
743
for (auto *genericParam : sig.getGenericParams()) {
744
if (!genericParam->isParameterPack())
0 commit comments