[SR-14838] Bare closures in top-level code don't get the 'do' fix-it #57185
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
improvement
parser
Area → compiler: The legacy C++ parser
Additional Detail from JIRA
md5: 80a769776aad254b1527dcf52d3526fa
Issue Description:
If you write a bare closure as a statement in a function, we suggest using
do
instead:But we don't have that for top-level code, apparently because it's diagnosed during parsing instead of type checking:
We should either let the type checker catch this error in top-level code too, or we should emit the same fix-it here.
The text was updated successfully, but these errors were encountered: