File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -13607,14 +13607,12 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint(
13607
13607
return nullptr;
13608
13608
13609
13609
auto genericParams = genericContext->getGenericParams();
13610
- if (!genericParams || genericParams->size() == 0 ) {
13610
+ if (!genericParams) {
13611
13611
// If declaration is a non-generic typealias, let's point
13612
13612
// to the underlying generic declaration.
13613
13613
if (auto *TA = dyn_cast<TypeAliasDecl>(decl)) {
13614
- if (TA->isGeneric())
13615
- return nullptr;
13616
- if (auto underlying = TA->getUnderlyingType()->getAnyNominal())
13617
- return getGenericParams(underlying);
13614
+ if (auto *UGT = TA->getUnderlyingType()->getAs<AnyGenericType>())
13615
+ return getGenericParams(UGT->getDecl());
13618
13616
}
13619
13617
}
13620
13618
@@ -13625,7 +13623,7 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint(
13625
13623
return SolutionKind::Error;
13626
13624
13627
13625
auto genericParams = getGenericParams(decl);
13628
- if (!genericParams || genericParams->size() == 0 ) {
13626
+ if (!genericParams) {
13629
13627
// FIXME: Record an error here that we're ignoring the parameters.
13630
13628
return SolutionKind::Solved;
13631
13629
}
You can’t perform that action at this time.
0 commit comments