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

Access exclusivity not enforced in Xcode playground

    XMLWordPrintable

    Details

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

      Version 10.0 beta (10L176w)

      Description

      Does not produce any error at all, be it compile- or run-time.

      var stepSize = 1
      func increment(_ x: inout Int) {
        x += stepSize
        x += stepSize
      }
      increment(&stepSize)
      print(stepSize)
      

        Attachments

          Activity

            People

            • Assignee:
              Hanzlik Richard
              Reporter:
              anthonylatsis Anthony Latsis
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: