<div dir="ltr"><i>"if you add a `someFunc` overload taking a different parameter name but the same types the above code becomes ambiguous."</i><div><br></div><div>Yes, I know, I forgot this example. <span style="line-height:1.5">Ironically that was the intent, but I do not choose good examples.</span></div><div><br></div><div>I was just exploring the idea of having to display the full signature at some point.<br></div></div><br><div class="gmail_quote"><div dir="ltr">Em dom, 27 de dez de 2015 às 23:11, Michel Fortin <<a href="mailto:michel.fortin@michelf.ca">michel.fortin@michelf.ca</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 27 déc. 2015 à 19:54, Wallacy via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> a écrit :<br>
> Even with backticks would not be possible.<br>
><br>
> You may need to reference the method signature altogether.<br>
><br>
> var someA = A()<br>
> let fn1 = someA.#someFunc(a: Int) -> Int<br>
> let fn2 = someA.#someFunc(a: Int) -> Double<br>
> let fn3 = someA.#someFunc(a: Double) -> Int<br>
> let fn4 = someA.#someFunc(a: Double) -> Double<br>
><br>
> An operator at the beginning perhaps?<br>
><br>
> let fn1 = #someA.someFunc(a: Int) -> Int<br>
> let fn2 = #someA.someFunc(a: Int) -> Double<br>
> let fn3 = #someA.someFunc(a: Double) -> Int<br>
> let fn4 = #someA.someFunc(a: Double) -> Double<br>
<br>
Well, this works today:<br>
<br>
let fn1: Int -> Int = someA.someFunc<br>
let fn2: Int -> Double = someA.someFunc<br>
let fn3: Double -> Int = someA.someFunc<br>
let fn4: Double -> Double = someA.someFunc<br>
<br>
In fact, this too works:<br>
<br>
let fn1: (a: Int) -> Int = someA.someFunc<br>
let fn2: (a: Int) -> Double = someA.someFunc<br>
let fn3: (a: Double) -> Int = someA.someFunc<br>
let fn4: (a: Double) -> Double = someA.someFunc<br>
<br>
See the parameter name in the type? It could be used to disambiguate, but currently it is not taken into account: if you add a `someFunc` overload taking a different parameter name but the same types the above code becomes ambiguous.<br>
<br>
--<br>
Michel Fortin<br>
<a href="https://michelf.ca" rel="noreferrer" target="_blank">https://michelf.ca</a><br>
<br>
</blockquote></div>