mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CS] Account for implicit returns in closures
Avoid defaulting to Void if we have an implicit return from which we can infer the result type.
This commit is contained in:
@@ -6460,9 +6460,9 @@ bool isTypeErasedKeyPathType(Type type);
|
||||
/// `{Writable, ReferenceWritable}KeyPath`.
|
||||
bool isKnownKeyPathDecl(ASTContext &ctx, ValueDecl *decl);
|
||||
|
||||
/// Determine whether given closure has any explicit `return`
|
||||
/// Determine whether given closure has any `return`
|
||||
/// statements that could produce non-void result.
|
||||
bool hasExplicitResult(ClosureExpr *closure);
|
||||
bool hasResultExpr(ClosureExpr *closure);
|
||||
|
||||
/// Emit diagnostics for syntactic restrictions within a given solution
|
||||
/// application target.
|
||||
|
||||
Reference in New Issue
Block a user