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

Fix parsing error for closure parameters with missing label name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3
    • Component/s: Parser
    • Labels:
      None

      Description

      For some weird reason we support missing label parameter name in closure (_ x) only for the first parameter

      foo({ (_ x) in print(x) }) // ok
      foo({ (_ x, _ y) in print(x) }) // we fail to parse second parameter
      foo({ (x, _ y) in print(x) }) // we fail to parse second parameter
      

        Attachments

          Activity

            People

            Assignee:
            arseniy.zaostrovnykh Arseniy Zaostrovnykh
            Reporter:
            elena.vilchik Elena Vilchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: