<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=""><div class="">I don’t understand how your “contrived example" could be improved by this new feature instead of existing features.</div><div class="">It sounds like you’re trying to combine two entirely different things into one function. One is a filter, which is easily made with .flatMap</div><div class=""><br class=""></div><div class="">let vehicles:[Vehicle] = [Bicycle(), Car()]<br class="">let cars = vehicles.flatMap { (vehicle) -> Car? in</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>return vehicle as? Car<br class="">}<span class="Apple-tab-span" style="white-space:pre">        </span>//[Car]<br class=""><div class="">//cars is an Array<Car></div><div class=""><br class=""></div><div class="">Since your processAll func would be restricted to Vehicle subclasses anyway, you won’t be calling any sub-class specific code on them without making explicit references to them, so do you need the type casting for anything other than the return?</div><div class=""><br class=""></div><div class="">If so, consider passing the exact class in as an argument:</div><div class=""><br class=""></div><div class="">func process(in vehicles:[Vehicle], type:Vehicle.Type) {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>for vehicle in vehicles {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>if type(of:car) != type) { continue }</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span></div><div class="">So, I’m not convinced that your “contrived example" are best solved with a new language feature.</div><div class=""><br class=""></div><div class="">-Ben</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 21, 2016, at 5:05 PM, Ramiro Feria Purón via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><b class="">Problem:</b><div class=""><br class=""></div><div class="">Currently, it is not possible to be explicit about the generic parameters (type parameters) in a generic function call. Type parameters are inferred from actual parameters:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">func</span><span style="font-variant-ligatures:no-common-ligatures" class=""> f<T>(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">_</span><span style="font-variant-ligatures:no-common-ligatures" class=""> t: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">T</span><span style="font-variant-ligatures:no-common-ligatures" class="">) {</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class="">//..</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">f</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(5) </span><span style="font-variant-ligatures:no-common-ligatures" class="">// T inferred to be Int</span></div>
<div class=""><span style="font-family:menlo;font-size:11px;font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">f</span><span style="font-family: menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-family:menlo;font-size:11px;font-variant-ligatures:no-common-ligatures;color:rgb(180,38,26)" class="">"xzcvzxcvx"</span><span style="font-family: menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class="">) </span><span style="color:rgb(0,143,0);font-family:menlo;font-size:11px;font-variant-ligatures:no-common-ligatures" class="">// T inferred to be string</span> </div><div class=""><br class=""></div><div class="">If no type parameter is involved in the formal parameters, the type parameter needs to be used somehow as part of the return type. For example:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">func</span><span style="font-variant-ligatures:no-common-ligatures" class=""> g<T>(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">_</span><span style="font-variant-ligatures:no-common-ligatures" class=""> x: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Int</span><span style="font-variant-ligatures:no-common-ligatures" class="">) -> [</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">T</span><span style="font-variant-ligatures:no-common-ligatures" class="">] {</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">var</span><span style="font-variant-ligatures:no-common-ligatures" class=""> result: [</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">T</span><span style="font-variant-ligatures:no-common-ligatures" class="">] = []</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class="">//..</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">return</span><span style="font-variant-ligatures:no-common-ligatures" class=""> result</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">}</span></div></div><div class=""><br class=""></div><div class="">In such cases, the type parameters must be inferrable from the context:<br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">g</span><span style="font-variant-ligatures:no-common-ligatures" class="">(7) </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,143,0)" class="">// Error: T cannot be inferred</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">let</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> array = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">g</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(7) </span><span style="font-variant-ligatures:no-common-ligatures" class="">// Error: T cannot be inferred</span></div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,143,0)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">let</span><span style="font-variant-ligatures:no-common-ligatures" class=""> array: [</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">String</span><span style="font-variant-ligatures:no-common-ligatures" class="">] = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">g</span><span style="font-variant-ligatures:no-common-ligatures" class="">(7) </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,143,0)" class="">// Ok: T inferred to be String</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,143,0)" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">let</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> array = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">g</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">String</span><span style="font-variant-ligatures: no-common-ligatures;" class="">>(7) </span><span style="font-variant-ligatures:no-common-ligatures" class="">// Error: Cannot explicitly specialise generic function</span><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small" class=""><b class="">Proposed Solution:</b></span></div><div class=""><br class=""></div><div class="">Allow explicit type parameters in generic function call:</div></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">let</span><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">_</span><span style="font-variant-ligatures:no-common-ligatures" class=""> = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">g</span><span style="font-variant-ligatures:no-common-ligatures" class=""><</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">String</span><span style="font-variant-ligatures:no-common-ligatures" class="">>(7) </span><span style="color:rgb(0,143,0)" class="">// Ok</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b style="color:rgb(34,34,34);font-family:arial,sans-serif" class="">Motivation<span style="font-size:11px" class="">:</span></b></span></div><div class=""><br class=""></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span></p><div class="">Consider the following contrived example:</div></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">class</span><span style="font-variant-ligatures:no-common-ligatures" class=""> Vehicle {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">var</span><span style="font-variant-ligatures:no-common-ligatures" class=""> currentSpeed = 0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class="">//..</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">class</span><span style="font-variant-ligatures:no-common-ligatures" class=""> Bicycle: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Vehicle</span><span style="font-variant-ligatures:no-common-ligatures" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class="">//..</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">class</span><span style="font-variant-ligatures:no-common-ligatures" class=""> Car: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Vehicle</span><span style="font-variant-ligatures:no-common-ligatures" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class="">//..</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(4, 51, 255);" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">@discardableResult</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">func</span><span style="font-variant-ligatures:no-common-ligatures" class=""> processAll<T: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Vehicle</span><span style="font-variant-ligatures:no-common-ligatures" class="">>(in vehicles: [</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Vehicle</span><span style="font-variant-ligatures:no-common-ligatures" class="">], condition: (</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Vehicle</span><span style="font-variant-ligatures:no-common-ligatures" class="">) -> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Bool</span><span style="font-variant-ligatures:no-common-ligatures" class="">) -> [</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">T</span><span style="font-variant-ligatures:no-common-ligatures" class="">] {</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">var</span><span style="font-variant-ligatures:no-common-ligatures" class=""> processed: [</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">T</span><span style="font-variant-ligatures:no-common-ligatures" class="">] = []</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">for</span><span style="font-variant-ligatures:no-common-ligatures" class=""> vehicle </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">in</span><span style="font-variant-ligatures:no-common-ligatures" class=""> vehicles {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">guard</span><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">let</span><span style="font-variant-ligatures:no-common-ligatures" class=""> t = vehicle </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">as</span><span style="font-variant-ligatures:no-common-ligatures" class="">? </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">T</span><span style="font-variant-ligatures:no-common-ligatures" class="">, condition(vehicle) </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">else</span><span style="font-variant-ligatures:no-common-ligatures" class=""> { </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">continue</span><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,143,0)" class="">//..</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> processed.</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">append</span><span style="font-variant-ligatures:no-common-ligatures" class="">(t)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">return</span><span style="font-variant-ligatures:no-common-ligatures" class=""> processed</span></div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(4,51,255)" class="">
</p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">func</span><span style="font-variant-ligatures:no-common-ligatures" class=""> aboveSpeedLimit(vehicle: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Vehicle</span><span style="font-variant-ligatures:no-common-ligatures" class="">) -> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Bool</span><span style="font-variant-ligatures:no-common-ligatures" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">return</span><span style="font-variant-ligatures:no-common-ligatures" class=""> vehicle.</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">currentSpeed</span><span style="font-variant-ligatures:no-common-ligatures" class=""> >= 100</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">
</span></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">let</span><span style="font-variant-ligatures:no-common-ligatures" class=""> processedVehicles = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">processAll</span><span style="font-variant-ligatures:no-common-ligatures" class="">(in: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">vehicles</span><span style="font-variant-ligatures:no-common-ligatures" class="">, condition: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">aboveSpeedLimit</span><span style="font-variant-ligatures:no-common-ligatures" class="">) </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,143,0)" class="">// Uh, T inferred to be Vehicle!</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,143,0)" class=""></span></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,51,255)" class="">let</span><span style="font-variant-ligatures:no-common-ligatures" class=""> processedCars: [</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Car</span><span style="font-variant-ligatures:no-common-ligatures" class="">] = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">processAll</span><span style="font-variant-ligatures:no-common-ligatures" class="">(in: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">vehicles</span><span style="font-variant-ligatures:no-common-ligatures" class="">, condition: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">aboveSpeedLimit</span><span style="font-variant-ligatures:no-common-ligatures" class="">) </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,143,0)" class="">// T inferred to be Car</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,143,0)" class=""></span></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo; color: rgb(0, 143, 0);" class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">processAll</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">Bicycle</span><span style="font-variant-ligatures: no-common-ligatures;" class="">>(in: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">vehicles</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, condition: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)" class="">aboveSpeedLimit</span><span style="font-variant-ligatures: no-common-ligatures;" class="">) </span><span style="font-variant-ligatures:no-common-ligatures" class="">// This should be allowed under this proposal</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b style="color:rgb(34,34,34);font-family:arial,sans-serif" class="">Notes<span style="font-size:11px" class="">:</span></b></span></div><div class=""><br class=""></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span></p><div class="">If necessary, the (real life) Swift code that lead to the proposal could be shared.</div></div><div class=""><br class=""></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></body></html>