mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Diagnostics] Add a diagnostic for inserting a $ to remove an extraneous property wrapper unwrap (#25507)
This commit is contained in:
@@ -1975,6 +1975,14 @@ bool MissingCallFailure::diagnoseAsError() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MissingPropertyWrapperUnwrapFailure::diagnoseAsError() {
|
||||
emitDiagnostic(getAnchor()->getLoc(),
|
||||
diag::extraneous_property_wrapper_unwrap, getPropertyName(),
|
||||
getFromType(), getToType())
|
||||
.fixItInsert(getAnchor()->getLoc(), "$");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SubscriptMisuseFailure::diagnoseAsError() {
|
||||
auto &sourceMgr = getASTContext().SourceMgr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user