Avatar
omochimetaru 5/27/2017 8:52 AM
class Cat { static var mike: Cat { return Cat() } } class FireCat : Cat { static var garo: Cat { return FireCat() } } class Person { var cat: Cat? } let p = Person() p.cat = .mike // ok p.cat = .garo // error