copilot-swe-agent[bot] 649c90af15 Fix contextual typing sensitivity to binding pattern structure
Modified getTypeFromArrayBindingPattern to make contextual type construction
agnostic to whether tuple destructuring elements have binding names. When
includePatternInType is true, cap minLength at 2 to ensure consistent
contextual types regardless of binding pattern variations.

This fixes an issue where [, , t] and [, s, ] produced different contextual
types, causing inconsistent generic type inference and spurious excess
property errors.

Addresses feedback in #41548 about making contextual types position-agnostic.

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2025-07-29 00:01:39 +00:00
..