<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>I actually expected it to create a different identifier that is unrelated to the keyword, so you can refer to `self` with backticks in the future to get the version bound by the guard, and self as a keyword to get the original value of self.<br></div>
<div>&nbsp;</div>
<div>Not that I think this is particularly useful, of course...<br></div>
<div>&nbsp;</div>
<div>-Kevin Ballard</div>
<div>&nbsp;</div>
<div>On Tue, Jan 5, 2016, at 08:42 PM, Greg Parker via swift-evolution wrote:<br></div>
<blockquote type="cite"><div>I think it is a bug &nbsp;:-) &nbsp;That's not what backquotes are for. It ought to be either supported without the backquotes or banned regardless of backquotes.&nbsp;<br></div>
<div>&nbsp;</div>
<div><blockquote type="cite"><div>On Jan 5, 2016, at 8:34 PM, Jacob Bandes-Storch &lt;<a href="mailto:jtbandes@gmail.com">jtbandes@gmail.com</a>&gt; wrote:<br></div>
<div>&nbsp;</div>
<div><div dir="ltr"><div>Yes, it seems to use the strong shadowing variable. (The compiler doesn't complain about "self.foo", and "self?.foo" becomes invalid because self is no longer optional.)<br></div>
<div>&nbsp;</div>
<div><div>If it weren't so useful, I'd call it a bug.<br></div>
<div><div>&nbsp;</div>
<div><div>On Tue, Jan 5, 2016 at 8:34 PM, Greg Parker <span dir="ltr">&lt;<a href="mailto:gparker@apple.com">gparker@apple.com</a>&gt;</span> wrote:<br></div>
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex;"><div style="word-wrap:break-word;"><div>Does further use of self after that actually use a strong shadowing variable? Or does it go back to the weak reference it already had as if the shadow were not there?<br></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><blockquote type="cite"><div><span>On Jan 5, 2016, at 8:26 PM, Jacob Bandes-Storch via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:</span><br></div>
<div>&nbsp;</div>
<div><div dir="ltr"><div><span>Wow! I didn't know that worked. It's a bit surprising, and perhaps not intended. I think the proposal is still valid.</span><br></div>
<div><div>&nbsp;</div>
<div><div><span>On Tue, Jan 5, 2016 at 8:21 PM, Christopher Rogers <span dir="ltr">&lt;<a href="mailto:christorogers@gmail.com">christorogers@gmail.com</a>&gt;</span> wrote:<br></span></div>
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex;"><span>You can shadow self with a guard like you wrote it if use the keyword escaping backquotes like so:<br><br>guard let `self` = self else { return }</span></blockquote></div>
</div>
</div>
</div>
</blockquote></div>
<div>&nbsp;</div>
</div>
</blockquote></div>
</div>
</div>
</div>
</div>
</blockquote></div>
<div>&nbsp;</div>
<div> <img style="height:1px !important;width:1px !important;border-top-width:0px !important;border-right-width:0px !important;border-bottom-width:0px !important;border-left-width:0px !important;margin-top:0px !important;margin-bottom:0px !important;margin-right:0px !important;margin-left:0px !important;padding-top:0px !important;padding-bottom:0px !important;padding-right:0px !important;padding-left:0px !important;" border="0" height="1" width="1" alt="" src="https://www.fastmailusercontent.com/proxy/320cdcffcc3a1047bda00d4ec8b5835017ec8f03573e85b88a1d025e3333ce8c/8647470737a3f2f25723030323431303e23647e23756e64676279646e2e65647f27766f2f60756e6f35707e6d3148765176786c673171614a7d2236454230345272776e436c4d4151473d22364f674743597c44597431396e43476a6148736a7f4754524156317244677758735756417f6759626e6a6f63615154565a5b40377e44767e486e654669595b483c636743794248663230394d4b69623f647b637a5a514752663a6c45577f6430336a47426341446a5157734948494f4d4a744f415d2232484832307e656647757c40763d493d223647725143733d223641444674733b68436e4767347c62664a6936487b4d22324e653a5249785058624d2236425c473a78396c63347943697935775172377d23344d23344/open"><br></div>
<div><u>_______________________________________________</u><br></div>
<div>swift-evolution mailing list<br></div>
<div><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br></div>
<div><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div>
</blockquote><div>&nbsp;</div>
</body>
</html>