Uploaded image for project: 'Swift'
  1. Swift
  2. SR-14221

Add tricky parsing test case.

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Labels:

      Description

      struct S {
          var x : Int = f() {
              3
          }
      }

      This is interpreted as a trailing closure, instead of being interpreted as an error where you are trying to have a computed property with an initial value (computed properties don't have initial values).

      We should check if the test/Parse directory has a test case which checks for this. If not, we should add this test case and leave a comment indicating why this test case is present.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            typesanitizer Varun Gandhi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: