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

Fix parsing error when directive appear as first element in switch statement body

    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 fun2(_ el:Int) {
          switch (el) {
          #if os(iOS) // Parsing error here
          case 1: print("1");
          #endif
          default: print("default");
          }
      }
      

        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: