[SR-6896] Regression: HOF overloads differing in @autoclosure are ambiguous called with forwarded @autoclosure parameter (Swift >= 4.1) #49445
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.1
type checker
Area → compiler: Semantic analysis
Environment
macOS 10.13.2 (17C88)
Xcode 9.3 beta (9Q98q)
Apple Swift version 4.1 (swiftlang-902.0.34 clang-902.0.30)
Additional Detail from JIRA
md5: 345f8d1ebfc5445534b7f1b936372631
Issue Description:
Two overloads of a higher order function differing only in `@autoclosure` are not considered conflicting declarations.
When such an overloaded HOF is called with a closure value, or with a literal (creating an auto-closure), there is no ambiguity.
However, when the overloaded HOF is called by forwarding a closure from a named parameter which is also `@autoclosure`, there is an unexpected ambiguity.
NOTE: This issue does not occur in Swift <4.1 (from the last Xcode 9.2 build). It appears a regression has been introduced since 4.0.3.
The text was updated successfully, but these errors were encountered: