> On Jun 16, 2016, at 11:30 PM, William Shipley <[email protected]> wrote: > >> private lazy var floorGeometryAndMaterialBacking: >> FloorPlatonicGeometryAndMaterial? = >> try! >> FloorPlatonicGeometryAndMaterial(modelDirectory: self.modelDirectoryURL) > > Oddly, the “self.” made all the difference in getting it to compile. I’m not > clear why in this case, I guess there’s some part of the language I didn’t > learn right. Thanks.
Yes, another headache that would be solved by the explicit self! The issue here is often (in my experience) that if the closure/one-liner defining the default lazy value contains an error, the compiler won't emit an error about the actual cause but will compain very generically it can't assign. You might consider reporting it on bugs.swift.org.
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
