Why does a function have long-term write access to all of its in-out parameters?
问题 According to the chapter of "Memory Safety" in the Swift Programming Language Guide (for Swift 4.2), there is a sentence "A function has long-term write access to all of its in-out parameters." https://docs.swift.org/swift-book/LanguageGuide/MemorySafety.html I created a new command line tool project to verify it in Xcode 10.1. var stepSize = 1 func increment(_ number: inout Int) { print(stepSize) } increment(&stepSize) I expect the output to be 1, but the actual output is a crash log