[ConstraintSystem] NFC: Remove workarounds related to (now deprecated) CSDiag

This commit is contained in:
Pavel Yaskevich
2020-02-18 10:13:09 -08:00
parent b905113f5c
commit 2dccdbfabf
5 changed files with 28 additions and 67 deletions

View File

@@ -575,8 +575,6 @@ Optional<Diag<Type, Type>> GenericArgumentsMismatchFailure::getDiagnosticFor(
return diag::cannot_convert_closure_result;
case CTP_ArrayElement:
return diag::cannot_convert_array_element;
// TODO(diagnostics): Make dictionary related diagnostics take prescedence
// over CSDiag. Currently these won't ever be produced.
case CTP_DictionaryKey:
return diag::cannot_convert_dict_key;
case CTP_DictionaryValue:
@@ -5051,9 +5049,7 @@ void MissingGenericArgumentsFailure::emitGenericSignatureNote(
continue;
auto type = resolveType(typeVar);
// This could happen if the diagnostic is used by CSDiag.
if (type->is<TypeVariableType>())
continue;
assert(!type->is<TypeVariableType>());
// If this is one of the defaulted parameter types, attempt
// to emit placeholder for it instead of `Any`.