Uploaded image for project: 'SonarSwift'
  1. SonarSwift
  2. SONARSWIFT-382

FP S2969: call inside conditional clause

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: Rules
    • Labels:
      None

      Description

      RSPEC-2969

      let x = [1, 2, 3]
      
      if let y = x.first(where: { $0 < 0 }){ // FP here, when fixed, compilation fails with message "Trailing closure requires parentheses for disambiguation in this context"
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elena.vilchik Elena Vilchik
                Reporter:
                elena.vilchik Elena Vilchik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: