[SR-1856] prefix() chained after sorted() and before map() confuses type inference in 3.0 #44465
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
standard library
Area: Standard library umbrella
swift 3.0
type checker
Area → compiler: Semantic analysis
Environment
macOS 10.11.5, Xcode 8 beta (8S128d) with Apple Swift version 3.0 (swiftlang-800.0.30 clang-800.0.24)
Additional Detail from JIRA
md5: 0cf780bcb513fd0c75d36886d36e650d
duplicates:
relates to:
Issue Description:
In Swift 3.0 the following code:
Causes the compiler to error with "Ambiguous use of 'prefix'", with the caret pointing to
sorted
.The same code compiles fine in Swift 2.2
The only way to make it compile is either to force the result of
prefix
into anArray
:..or to split the
map
onto a separate line:The text was updated successfully, but these errors were encountered: