File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1468,10 +1468,9 @@ CanType TypeBase::computeCanonicalType() {
14681468 // If we haven't set a depth for this generic parameter, try to do so.
14691469 // FIXME: This is a dreadful hack.
14701470 if (gpDecl->getDepth () == GenericTypeParamDecl::InvalidDepth) {
1471- if (auto decl =
1472- gpDecl->getDeclContext ()->getInnermostDeclarationDeclContext ())
1473- if (auto valueDecl = decl->getAsGenericContext ())
1474- (void )valueDecl->getGenericSignature ();
1471+ auto *dc = gpDecl->getDeclContext ();
1472+ auto *gpList = dc->getAsDecl ()->getAsGenericContext ()->getGenericParams ();
1473+ gpList->setDepth (dc->getGenericContextDepth ());
14751474 }
14761475
14771476 assert (gpDecl->getDepth () != GenericTypeParamDecl::InvalidDepth &&
You can’t perform that action at this time.
0 commit comments