Created
September 7, 2014 12:46
-
-
Save sketchytech/a691de7f40ee3202ac86 to your computer and use it in GitHub Desktop.
Type methods and properties
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 SomeClass { | |
class var description:String { | |
return "computed class property" | |
} // ok | |
class var property:String = "class property" // compiler warning: class variables not yet supported | |
class func typeMethod() -> String { | |
return "type method" | |
} // ok | |
} | |
SomeClass.description // ok | |
SomeClass.typeMethod() // ok | |
SomeClass.property // won't work because of class variables being unsupported |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment