<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 4 Jul 2016, at 21:12, Mark Dalrymple via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Here's the one I started with:<div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class="">&nbsp; &nbsp;</span><span style="font-size:13px" class="">lazy var c:Int = {return a*b}()</span><br class=""></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class="">and ended up with:</span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class=""><div class="">&nbsp; &nbsp;&nbsp;lazy var c:Int = {return self.a * self.b}()</div><div class=""><br class=""></div><div class="">It's in a closure, so need to explicitly reference self.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">++md</div><div class=""><br class=""></div></span></div></div></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">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’.</div><div class=""><br class=""></div><div class="">Karl</div></body></html>