<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="">So then this would be disambiguated like this?<div class=""><br class=""></div><div class=""><font face="Menlo" class="">let staticValue = Foo.bar // Defaults to accessing the static value, when there is ambiguity</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">let value: &nbsp; Bar &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = Foo.bar</font></div><div class=""><font face="Menlo" class="">let keyPath: WritableKeyPath&lt;Foo, Bar&gt; = Foo.bar</font></div><div class=""><br class=""></div><div class="">It’s a little unfortunately to have to spell out <font face="Menlo" class="">WritableKeyPath&lt;Foo, Bar&gt;</font> there, but as long as there’s some way to do it, I don’t think it’s a problem. This is likely a rare edge case.</div><div class=""><br class=""></div><div class="">-BJ Homer</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 17, 2017, at 3:56 PM, Joe Groff &lt;<a href="mailto:jgroff@apple.com" class="">jgroff@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Mar 17, 2017, at 2:53 PM, Michael LeHew &lt;<a href="mailto:lehewjr@apple.com" class="">lehewjr@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 17, 2017, at 2:21 PM, BJ Homer &lt;<a href="mailto:bjhomer@gmail.com" class="">bjhomer@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">This looks great!<div class=""><br class=""></div><div class="">What happens in the case when there is a static property by the same name as an instance property? e.g.</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">struct Foo {</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; static var bar: Bar</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; var bar: Bar</font></div><div class=""><font face="Menlo" class="">}</font></div></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">Foo.bar // What is this?</font></div><div class=""><br class=""></div><div class="">Is it still possible to reference both the static property and a KeyPath to the instance method?&nbsp;</div></div></div></blockquote><div class=""><br class=""></div>This is essentially the same question that I arrived at in my reply to Vladimir. &nbsp;I think Joe might be best able to answer here.</div></div></div></blockquote><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">We already encounter this situation with static vs instance methods, since `Foo.bar` can refer to either a static method `bar` or an unbound instance method `bar`. We use type context to disambiguate, favoring the static member if context doesn't help:</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="">struct X {</div><div class="">&nbsp; static func foo() {}</div><div class="">&nbsp; func foo() {}</div><div class="">}</div><div class=""><br class=""></div><div class="">let foo1 = X.foo // Defaults to static member</div><div class="">let foo2: () -&gt; () = X.foo // Picks static member by type context</div><div class="">let foo3: (X) -&gt; () -&gt; () = X.foo // Picks instance member by type context</div><div class=""><br class=""></div><div class="">-Joe</div></div></div></blockquote></div><br class=""></div></body></html>