[SR-7964] Overloading a method with an optional parameter chooses wrong overload #50499
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.2
type checker
Area → compiler: Semantic analysis
Environment
Apple Swift version 4.2 (swiftlang-1000.0.16.7 clang-1000.10.25.3)
Target: x86_64-apple-darwin17.6.0
Additional Detail from JIRA
md5: aee7f963f20817fccf8bc7e6367f9ff8
duplicates:
Issue Description:
Given the following code:
The output is
"Do this optionally"
in Swift 4.1. I'd assume that the Swift 4.1 behaviour was correct here, since the value is clearly not an optional.The text was updated successfully, but these errors were encountered: