[SR-461] prefix() chained after filter() confuses type inference when used on a sequence that uses AnyGenerator #43078
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
standard library
Area: Standard library umbrella
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 7a921301033d688e26e6764735b18b41
duplicates:
Issue Description:
When this code is typed in:
The compiler warns about "Ambiguous use of 'filter'" on the line where prefixWithFilter2 is defined.
I spent some time on trying to find the source problem, and this post helped me:
https://forums.developer.apple.com/thread/26147
I'm wondering if there's no way around the compiler making a choice of which type chain variation to go for, would it be possible to display a more detailed error message?
Unfortunately "Ambiguous use of 'filter'" didn't help me that much understanding the problem, and it also didn't suggest any resolution (which is actually quite easy).
The text was updated successfully, but these errors were encountered: