@David
If you would split up the statement like this...
let x = 0 *** 4
let result = x +++ 0
... the compiler would report an ambiguity error, because both overloads of ***
are valid and of equivalent priority.
You could do something like this though:
let x: Int = 0 *** 4// picks f2
let res
I seem to remember that while it is possible to define, the compiler will yield
an error if you try to use the functions (“cannot resolve”).
Regards,
Rien
Site: http://balancingrock.nl
Blog: http://swiftrien.blogspot.com
Github: http://github.com/Swiftrien
Project: http://swiftfire.nl
> On 1
> On Nov 14, 2016, at 2:05 PM, Toni Suter via swift-users
> wrote:
>
> Hi,
>
> I would have expected that the following code reports an error, because
> of ambiguous function overloads:
>
> infix operator ***: MultiplicationPrecedence
> infix operator +++: AdditionPrecedence
>
> func ***(x:
> On Nov 14, 2016, at 16:05, Toni Suter via swift-users
> wrote:
>
> Hi,
>
> I would have expected that the following code reports an error, because
> of ambiguous function overloads:
>
> infix operator ***: MultiplicationPrecedence
> infix operator +++: AdditionPrecedence
>
> func ***(x: In
Hi,
I would have expected that the following code reports an error, because
of ambiguous function overloads:
infix operator ***: MultiplicationPrecedence
infix operator +++: AdditionPrecedence
func ***(x: Int, y: Int) -> String {
print("f1")
return ""
}
func ***(x: Int, y: Int)