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

Fix unhandled ambiguity in PATTERN

    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

      Reproducer:

      func amb(_ c1: Any, _ c2: Any) {
        switch (c1, c2) {
          case let (c1 as C1, c2 as (C2)): print("c") // ambiguity generated by parentheses around C2
          default: print("d")
        }
      }
      

        Attachments

          Activity

            People

            Assignee:
            arseniy.zaostrovnykh Arseniy Zaostrovnykh
            Reporter:
            massimo.paladin Massimo PALADIN
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: