Created
May 29, 2018 20:54
-
-
Save regularberry/8f792a85c43bfcd8eca71a4510028bde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MutableClass { | |
var val: Int? | |
init(val: Int = 0) { | |
self.val = val | |
} | |
func update(newVal: Int) { | |
val = nil | |
val = newVal | |
let f = val! + 5 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment