[SR-13644] Conditional compilation breaks overload resolution #56080
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
Target: x86_64-apple-darwin19.6.0
(as included in Xcode 12.0.1)
Additional Detail from JIRA
md5: 0f8f5d009c6dcac8286d646e0608e871
Issue Description:
The following code chooses the wrong overload of
function
ifDEBUG
is defined.Given that
DEBUG
is set, there is actually no parameter used infunction
. Thus it should take the overload whose closure takes no parameter.The text was updated successfully, but these errors were encountered: