mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Diagnostics] NFC: Remove "trailing" from method name for closures with missing args
`MissingArgumentsFailure::diagnoseClosure` can actually diagnose both
closures in argument positions as well as when their type comes from
context e.g. `let _: (Int) -> Void = {}`.
This commit is contained in:
@@ -3509,12 +3509,12 @@ bool MissingArgumentsFailure::diagnoseAsError() {
|
||||
anchor = captureList->getClosureBody();
|
||||
|
||||
if (auto *closure = dyn_cast<ClosureExpr>(anchor))
|
||||
return diagnoseTrailingClosure(closure);
|
||||
return diagnoseClosure(closure);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MissingArgumentsFailure::diagnoseTrailingClosure(ClosureExpr *closure) {
|
||||
bool MissingArgumentsFailure::diagnoseClosure(ClosureExpr *closure) {
|
||||
auto &cs = getConstraintSystem();
|
||||
FunctionType *funcType = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user