You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve type inference for coalesce with ErrorType, strpos === int narrowing, and str_repeat return types
- Handle ErrorType in InitializerExprTypeResolver coalesce: `[][0] ?? 42` now resolves to `42` instead of `*ERROR*`
- Apply truthy narrowing when function/method calls are compared to truthy constants via ===, enabling `strpos($s, ':') === 5` to narrow `$s` to non-falsy-string
- Return non-falsy-string from str_repeat when input is non-empty and multiplier >= 2 (result length >= 2 means it can't be '0' or '')
- Preserve numeric-string in str_repeat when multiplier is exactly 1
- Update test assertions for all improved type inference cases
0 commit comments