Open guillaumebrunerie opened 7 months ago
This is already fixed here: https://github.com/microsoft/TypeScript/pull/52850 . I just pushed out a new test case based on this issue: https://github.com/microsoft/TypeScript/pull/52850/commits/76d7f4e286463b316d8c36da5fa8b9821a228c59
🔎 Search Terms
array spread, diagnostics
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?ts=5.4.4#code/C4TwDgpgBAggRgYygXigIgIZqgH3XbPNBNAbgChyEB7AOwGdgoMAnFjEARgC5ZEBtALooo-TGgA0+NIIpU6jZmw4AmXvARCR-clD1QAdEdbsuE3fvFSLetAXP70AE0nlBQA
💻 Code
🙁 Actual behavior
The whole contents of
array2
is highlighted in red.🙂 Expected behavior
Only the
"d"
should be highlighted in red, as it is the only incorrect part ofarray2
. Note that if we remove the spread...array1
, then it works as expected.Additional information about the issue
With more complicated types/data, this bug can make it pretty hard to diagnose where the problem is.