mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Rather than eagerly binding them to holes if the sequence element type ends up being Any, let's record the CollectionElementContextualMismatch fix, and then if the patterns end up becoming holes, skip penalizing them if we know the fix was recorded. This avoids prematurely turning type variables for ExprPatterns into holes, which should be able to get better bindings from the expression provided. Also this means we'll apply the logic to non-Any sequence types, which previously we would give a confusing diagnostic to.
587 KiB
587 KiB