No error thrown when calling concat
with T[]
and T[][]
#55844
Labels
Duplicate
An existing issue was already created
concat
with T[]
and T[][]
#55844
π Search Terms
"concat", "concat wrong type", "concat no error"
π Version & Regression Information
concat
β― Playground Link
https://www.typescriptlang.org/play?ts=3.3.3#code/MYewdgzgLgBAhgJwQRhgXhgbU8gurgKFElkQQCZ14lkA6Y4OKACk3NwEojwIQAbAKa0+IAObMy5LtxLUEAZirYARHGX4Z0OQBYqZefXCMWmZQCN1XYr0HCxEpNo5A
π» Code
π Actual behavior
No error is shown, and type of the result is incorrectly inferred as
T[]
π Expected behavior
Either an error should be shown, or the result of
concat
should be(T | T[])[]
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: