[SR-7644] Unexpected errors about argument labels when passing a reference to a private method to a function #50185
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
type checker
Area → compiler: Semantic analysis
Environment
Seen with Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1), and with Swift built from source from dc5827c.
Additional Detail from JIRA
md5: 2162c95296299e1d292338b27a9b442e
Issue Description:
Consider this code, in which the private initializer of `S` is passed to a function as an argument of a generic type:
These are the errors that are seen:
Only the first error is what is expected. In the latter two cases the errors unexpectedly claim the argument labels are incorrect, when in fact the issue is that the initializer is inaccessible.
The text was updated successfully, but these errors were encountered: