-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationgood first issueGood for newcomersGood for newcomers
Description
Previous ID | SR-7113 |
Radar | None |
Original Reporter | designatednerd (JIRA User) |
Type | Bug |
Attachment: Download
Environment
Xcode Version 9.2 (9C40b)
OS X Version 10.12.6 (16G1212)
swift --version output:
Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, DiagnosticsQoI, StarterBug |
Assignee | None |
Priority | Medium |
md5: 0de4d3bda4791cbb582db3d2e00a5ef2
Issue Description:
When trying to add a try
to a closure, the warning received is confusing if there is something within the closure which also needs a try
. See attached screenshot for an example.
Per @jckarter, this is something which probably needs a clearer message: https://twitter.com/jckarter/status/969774890373996544
My personal suggestion for a message would be "try
outside of a closure does not affect the code within the closure", but feel free to bikeshed that as much as you'd like.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationgood first issueGood for newcomersGood for newcomers