[SR-9738] Poor error message when calling @dynamicCallable with incorrect parameter types #52170
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
good first issue
Good for newcomers
type checker
Area → compiler: Semantic analysis
Environment
Toolchain: swift-5.0-DEVELOPMENT-SNAPSHOT-2018-12-28-a
Additional Detail from JIRA
md5: 93063d6e18bb5003b95809d72d784923
cloned to:
Issue Description:
If you call a dynamicCallable type as a function with the wrong type of parameters, it gives the message "Cannot call value of non-function type 'Foo'". The error message should be more akin to the message when you call a regular function with incorrect parameter types: "Cannot convert value of type 'String' to expected argument type 'Int'".
The text was updated successfully, but these errors were encountered: