[SR-4075] Array covariance does not apply to function subtyping #46658
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
Additional Detail from JIRA
md5: f83b18da5d48933c1170230c46a5db8d
Issue Description:
Since functions are contravariant in their arguments and arrays are covariant in their element type, I would expect the assignment to work. However, it does not:
The text was updated successfully, but these errors were encountered: