[SR-9970] Type inference for literals in argument position depends on whether parameter is named #52374
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
Additional Detail from JIRA
md5: 921b244301ef8cfa8e42e5e347683f38
cloned to:
Issue Description:
This prints 1 and 4, which is somewhat surprising.
It looks like the type of [0] is inferred as [Int] and then as [Any]. But the type shouldn't depend on whether the parameter is named, should it?
The text was updated successfully, but these errors were encountered: