Last active
August 29, 2015 14:22
-
-
Save BradB132/bb35171b21d3e7d39668 to your computer and use it in GitHub Desktop.
FirstAppInSwift-8
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
public class MyClass { | |
private(set) public var myProperty:Int = 0 | |
} | |
//Here’s some code that tests our new property | |
let myObj = MyClass() | |
println(myObj.myProperty) //this line compiles | |
myObj.myProperty = 5 //this causes a compile error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment