[SR-13844] Function Application not lookup dynamicCallable overload when has callAsFunction function #56242
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
Attachment: Download
Environment
Xcode 12.2 Beta 3
Also a near master branch
Additional Detail from JIRA
md5: 90e5f387ad08981e91f545789901badf
Issue Description:
As text
We have a type that is both dynamicCallable and a nominal callable type with a callAsFunction
the compiler seems to stop looking for overloads when it finds callable.
The only overload found is the callAsFunction
If one removes the `callAsFunction` definition this code type checks fine because it can find the dynamicCallable overload and apply correctly.
I believe this is a bug because it should actually attempt both and this code as it is should type check correctly applying dynamic call overload.
The text was updated successfully, but these errors were encountered: