Why is there a "Type of expression is ambiguous without a type annotation." error when using a ternary operator on inferred function types in Swift?

Seems bugged. These all compile.

func chooseStepFunction(backward: Bool) -> (Int) -> Int {
  if backward { stepBackward } else { stepForward }
}
func chooseStepFunction(backward: Bool) -> (Int) -> Int {
  backward ? stepBackward as (_) -> _ : stepForward
}
func chooseStepFunction(backward: Bool) -> (Int) -> Int {
  backward ? stepBackward : stepForward as (_) -> _
}

This version of the code from the nested functions section compiles fine. The problem comes only with externally-scoped functions.

func chooseStepFunction(backward: Bool) -> (Int) -> Int {
  func stepForward(input: Int) -> Int { return input + 1 }
  func stepBackward(input: Int) -> Int { return input - 1 }
  return backward ? stepBackward : stepForward
}