mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Improve diagnoses of generic specializations
Always add constraints, find fixes during simplify. New separate fix for allow generic function specialization. Improve parse heuristic for isGenericTypeDisambiguatingToken.
This commit is contained in:
@@ -9338,7 +9338,12 @@ bool InvalidMemberReferenceWithinInitAccessor::diagnoseAsError() {
|
||||
}
|
||||
|
||||
bool ConcreteTypeSpecialization::diagnoseAsError() {
|
||||
emitDiagnostic(diag::not_a_generic_type, ConcreteType);
|
||||
emitDiagnostic(diag::not_a_generic_type, resolveType(ConcreteType));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GenericFunctionSpecialization::diagnoseAsError() {
|
||||
emitDiagnostic(diag::cannot_explicitly_specialize_generic_function);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user