<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="">Yeah, my understanding is that .foo syntax only works if ‘foo’ is an immediate static member of the contextual type where the expression appears. So nested member access like .<a href="http://foo.br" class="">foo.b</a>ar does not make sense.<div class=""><br class=""></div><div class="">Slava</div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Sep 1, 2017, at 6:04 AM, Adrian Zubarev via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">Yet this is correct behavior because the compiler cannot traverse the expression tree without knowing the root type of that expression tree. The type information flow in such case should be from root to the leaves where the root is NOT the root of the expression, but the type from the function parameter, which then should be passed to the expression tree. However the expression tree is not complete, because there MIGHT be another `phythagoreanTruple` somewhere else. Even if there is no other `phythagoreanTruple`, here the general rules are applied which results into the mentioned error message.</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><br class=""></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">Please correct me if I’m wrong here.</div><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div id="bloop_sign_1504270598470363136" class="bloop_sign" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><p class="airmail_on" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Am 1. September 2017 um 14:53:35, David Hart (<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>) schrieb:</p><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; 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-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""></div><div class="">Its slightly different though. In the case of:<div class=""><br class=""></div><div class=""><font face="Menlo" class="">let cgColor: CGColor = .clear.cgColor</font></div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">clear</font><span class="Apple-converted-space"> </span>is a static property on<span class="Apple-converted-space"> </span><font face="Menlo" class="">UIColor</font>, not<span class="Apple-converted-space"> </span><font face="Menlo" class="">CGColor</font>. In his example, <font face="Menlo" class="">pythagoreanTriple</font><span class="Apple-converted-space"> </span>is a property on<span class="Apple-converted-space"> </span><font face="Menlo" class="">Double</font><span class="Apple-converted-space"> </span>so it does feel like a bug.</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 1 Sep 2017, at 13:31, Adrian Zubarev via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="bloop_customfont" class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;">It’s because the compiler does not support this yet. It’s the same with `let cgColor: CGColor = .clear.cgColor // will not work`.</div><div id="bloop_customfont" class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;"><br class=""></div><div id="bloop_customfont" class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;">Instead you need to write `UIColor.clear.cgColor` or in your case `Double.phythagoreanTruple.0`</div><br class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div id="bloop_sign_1504265335075953920" class="bloop_sign" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></div><br class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><p class="airmail_on" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Am 1. September 2017 um 12:17:57, Rudolf Adamkovič via swift-users (<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>) schrieb:</p><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""></div><div class=""><p class="" style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: inherit; vertical-align: baseline; clear: both; color: rgb(36, 39, 41);"><span class="">Given the following extension ...</span></p><pre class="lang-swift prettyprinted prettyprint" style="margin-top: 0px; margin-bottom: 1em; padding: 5px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; line-height: inherit; vertical-align: baseline; width: auto; max-height: 600px; overflow: auto; background-color: rgb(239, 240, 241); color: rgb(57, 51, 24); word-wrap: normal;"><span class=""><code class="" style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; white-space: inherit;"><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(16, 16, 148);">extension</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(43, 145, 175);">Double</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(16, 16, 148);">typealias</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(43, 145, 175);">Triple</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">(</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(43, 145, 175);">Double</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(43, 145, 175);">Double</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(43, 145, 175);">Double</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(16, 16, 148);">static</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(16, 16, 148);">let</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> pythagoreanTriple</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">:</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(43, 145, 175);">Triple</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">(</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(125, 39, 39);">3</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(125, 39, 39);">4</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(125, 39, 39);">5</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">}</span></code></span></pre><p class="" style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: inherit; vertical-align: baseline; clear: both; color: rgb(36, 39, 41);">... why does Swift compiler emits the following errors?</p><pre class="lang-swift prettyprinted prettyprint" style="margin-top: 0px; margin-bottom: 1em; padding: 5px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; line-height: inherit; vertical-align: baseline; width: auto; max-height: 600px; overflow: auto; background-color: rgb(239, 240, 241); color: rgb(57, 51, 24); word-wrap: normal;"><code class="" style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; white-space: inherit;"><span class="com" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(133, 140, 147);">// Type of expression is ambiguous without more context
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(16, 16, 148);">let</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> a</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">:</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(43, 145, 175);">Double</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">pythagoreanTriple</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">.</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(125, 39, 39);">0</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">
</span><span class="com" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(133, 140, 147);">// Type of expression is ambiguous without more context
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(16, 16, 148);">func</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> f</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">(_</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> x</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">:</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(43, 145, 175);">Double</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">{}</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">
f</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">(.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">pythagoreanTriple</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">.</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(125, 39, 39);">0</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; color: rgb(48, 51, 54);">)</span></code></pre><p class="" style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: inherit; vertical-align: baseline; clear: both; color: rgb(36, 39, 41);">The errors disappear with explicit <code class="" style="margin: 0px; padding: 1px 5px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; background-color: rgb(239, 240, 241); white-space: pre-wrap;">Double.pythagoreanTriple.0</code>.</p><p class="" style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: inherit; vertical-align: baseline; clear: both; color: rgb(36, 39, 41);">Why doesn't the compiler infer <code class="" style="margin: 0px; padding: 1px 5px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; background-color: rgb(239, 240, 241); white-space: pre-wrap;">Double</code> in this case?</p><p class="" style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: inherit; vertical-align: baseline; clear: both; color: rgb(36, 39, 41);">FYI: Posted also to Stack Overflow here:</p><p class="" style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: inherit; vertical-align: baseline; clear: both; color: rgb(36, 39, 41);"><a href="https://stackoverflow.com/questions/45998034/type-of-expression-is-ambiguous-for-static-tuples" class="">https://stackoverflow.com/questions/45998034/type-of-expression-is-ambiguous-for-static-tuples</a></p><p class="" style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: inherit; vertical-align: baseline; clear: both; color: rgb(36, 39, 41);">R+</p>_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" class="">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></div></blockquote><span class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">_______________________________________________</span><br class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">swift-users mailing list</span><br class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="mailto:swift-users@swift.org" class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">swift-users@swift.org</a><br class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="https://lists.swift.org/mailman/listinfo/swift-users" class="" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://lists.swift.org/mailman/listinfo/swift-users</a></div></blockquote></div><br class=""></div></div></div></span></blockquote><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">swift-users mailing list</span><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a></span><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" class="">https://lists.swift.org/mailman/listinfo/swift-users</a></span></div></blockquote></div><br class=""></div></div></body></html>