Is there a reason that the following code always prints out nil?
class Foo{ @lazy var bar: Int? = 5}println(Foo().bar)
I would think that when the bar property is accessed it would be initialized to 5.
Aucun commentaire:
Enregistrer un commentaire