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

InitializerDeclSyntax.initKeyword position is incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: SwiftSyntax
    • Labels:
      None
    • Environment:

      Description

      Given the following code:

      class MyFunc {
          init(param: String) {}
      }
      

      The position of `initKeyword` returns the incorrect values:

      (lldb) po syntax.initKeyword.position
      ▿ AbsolutePosition
        - utf8Offset : 14
        - line : 1
        - column : 15
      

      Expected values are:

      line: 2

      column: 5

      offset: 19

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Leitch Ian Leitch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: