Higher order functions and function types in Swift

What version are you using to get that result?

Here's what I get with both the default toolchain of Xcode 10.1 and dev snapshot 2018-12-04:

func hmm(_ fn:  (Int, Int)  -> Int) { print("two ints") }
func hmm(_ fn: ((Int, Int)) -> Int) { print("pair") }

func test() {
    let twoIntsFn: (Int, Int) -> Int = { $0 + $1 }
    let pairFn: ((Int, Int)) -> Int =  { $0.0 + $0.1 }
    
    hmm(pairFn) // ERROR: Ambiguous use of 'hmm'
    hmm(twoIntsFn) // ERROR: Ambiguous use of 'hmm'
}

test()

Or more specifically:

test.swift:8:5: error: ambiguous use of 'hmm'
    hmm(pairFn) // ERROR: Ambiguous use of 'hmm'
    ^
test.swift:1:6: note: found this candidate
func hmm(_ fn:  (Int, Int)  -> Int) { print("two ints") }
     ^
test.swift:2:6: note: found this candidate
func hmm(_ fn: ((Int, Int)) -> Int) { print("pair") }
     ^
test.swift:9:5: error: ambiguous use of 'hmm'
    hmm(twoIntsFn) // ERROR: Ambiguous use of 'hmm'
    ^
test.swift:1:6: note: found this candidate
func hmm(_ fn:  (Int, Int)  -> Int) { print("two ints") }
     ^
test.swift:2:6: note: found this candidate
func hmm(_ fn: ((Int, Int)) -> Int) { print("pair") }

The result is the same for both a debug and release build.