mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CSSimplify] Detect and diagnose attempts to specialize non-generic types/aliases
This commit is contained in:
@@ -13658,8 +13658,15 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint(
|
||||
}
|
||||
}
|
||||
|
||||
if (openedGenericParams.empty())
|
||||
return SolutionKind::Error;
|
||||
if (openedGenericParams.empty()) {
|
||||
if (!shouldAttemptFixes())
|
||||
return SolutionKind::Error;
|
||||
|
||||
return recordFix(AllowConcreteTypeSpecialization::create(
|
||||
*this, type1, getConstraintLocator(locator)))
|
||||
? SolutionKind::Error
|
||||
: SolutionKind::Solved;
|
||||
}
|
||||
|
||||
assert(openedGenericParams.size() == genericParams->size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user