Skip to content

Instantly share code, notes, and snippets.

@Cananito
Last active September 14, 2015 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cananito/54d47a36f142afed63f8 to your computer and use it in GitHub Desktop.
Save Cananito/54d47a36f142afed63f8 to your computer and use it in GitHub Desktop.
You can mutate constant properties in init. Swift 1.0 Beta 3.
class SomeClass {
let someArray: Array<String>
init() {
self.someArray = []
self.someArray.append("Fine") // No error
}
func someFunction() {
self.someArray.append("Not Fine") // Error
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment