mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Diagnostics] Diagnose invalid method references in key path
This commit is contained in:
@@ -2486,3 +2486,9 @@ bool InvalidMemberWithMutatingGetterInKeyPath::diagnoseAsError() {
|
||||
emitDiagnostic(getLoc(), diag::expr_keypath_mutating_getter, getName());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool InvalidMethodRefInKeyPath::diagnoseAsError() {
|
||||
emitDiagnostic(getLoc(), diag::expr_keypath_not_property, getKind(),
|
||||
getName());
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user