mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Diagnostics] Use ContextualFailure and ContextualMistatch as base classes
for `AutoClosurePointerConversionFailure` and `AllowAutoClosurePointerConversion` respectively.
This commit is contained in:
@@ -1981,7 +1981,7 @@ bool AutoClosureForwardingFailure::diagnoseAsError() {
|
||||
bool AutoClosurePointerConversionFailure::diagnoseAsError() {
|
||||
auto *anchor = getAnchor();
|
||||
auto diagnostic = diag::invalid_autoclosure_pointer_conversion;
|
||||
emitDiagnostic(anchor->getLoc(), diagnostic, PointeeType, PointerType)
|
||||
emitDiagnostic(anchor->getLoc(), diagnostic, getFromType(), getToType())
|
||||
.highlight(anchor->getSourceRange());
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user