[SR-8736] Bad diagnostic for use of trailing closures in an if
#51245
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
parser
Area → compiler: The legacy C++ parser
Attachment: Download
Environment
MacOS 10.13.5, Xcode 9.4.1, Swift 4.2
Additional Detail from JIRA
md5: 99b5b574037577a367a74dc8e3a41396
duplicates:
Issue Description:
I use Swift 4.2 and got the error with below code:
But when I change to below code, it can build success:
The error is:
![](Screen Shot 2018-09-12 at 2.17.48 PM.png)
The text was updated successfully, but these errors were encountered: