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

Same-named tuple labels are accepted

    XMLWordPrintable

    Details

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

      Xcode 10 default toolchain

      Description

      As described in this forum thread, the following compiles:

      func f(x a: Int, x b: Int) -> (y: Int, y: Int) {
          return (a, b)
      }
      print(f(x: 1, x: 2)) // prints (y: 1, y: 2)
      

        Attachments

          Activity

            People

            • Assignee:
              suyashsrijan Suyash Srijan
              Reporter:
              jens Jens Persson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: