[SR-5931] incorrect error message "'UnsafePointer<UInt8>' is not convertible to 'UnsafePointer<_>'" #48490
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 5879afa706162516f67d24b564cacb9a
Issue Description:
The following code:
…is erroneous only because the call to `target.append` is missing a `count:` label. But instead of complaining about that, swiftc produces two useless and misleading errors:
Similarly, if `count:` is added but `inout` is removed:
swiftc produces the "not convertible" error instead of complaining that `target` is immutable:
In both cases, removing the type annotation causes the correct error to be displayed, but in the first case the meaningless "escaping closures" error is still present:
Tested on latest nightly.
(Probably the same as SR-2297, which I just closed because the original test case works correctly now.)
The text was updated successfully, but these errors were encountered: