[SR-6285] More incorrect diagnostics with generics #48835
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
Swift version 4.0.2 (swiftlang-900.0.69.1 clang-900.0.38)
Additional Detail from JIRA
md5: 570e6454e0afc0ed5445de853c1ce030
Issue Description:
Produces:
If I move the 2 outside, I get another useless, though probably closer to the truth, diagnostic:
I still have no idea why `AnyCollection<String>` is not compatible here. Looks like the type defines `IndexDistance` as `IntMax`, which I can't get docs on what that type is.
Regardless, if that's what the error is, I'd expect something like `f requires C.IndexDistance to be Int, AnyCollection<String>.IndexDistance is IntMax`.
The text was updated successfully, but these errors were encountered: