> On 4 Jul 2016, at 21:12, Mark Dalrymple via swift-users
> <[email protected]> wrote:
>
> Here's the one I started with:
>
> lazy var c:Int = {return a*b}()
>
> and ended up with:
>
> lazy var c:Int = {return self.a * self.b}()
>
> It's in a closure, so need to explicitly reference self.
>
> Cheers,
> ++md
>
I’ve been hitting this myself. I think it’s a bug -- yes, you are technically
in a closure, but the closure does not capture ‘self’ beyond the lifetime of
‘self’. In this context, ’self’ should automatically be ‘unowned’.
Karl
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users