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() {
1468
1468
// If we haven't set a depth for this generic parameter, try to do so.
1469
1469
// FIXME: This is a dreadful hack.
1470
1470
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 ());
1475
1474
}
1476
1475
1477
1476
assert (gpDecl->getDepth () != GenericTypeParamDecl::InvalidDepth &&
You can’t perform that action at this time.
0 commit comments