Broken double inference step in variadic tuple types when rest elements come into play #52017
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
Bug Report
π Search Terms
variadic tuple type, rest element, infer, unknown[]
It might be related to #51138 and #51157
π Version & Regression Information
This is the behavior in every version I tried, nightly included.
β― Playground Link
Playground link with relevant code
Minimal repro of the problem
π» Code
The double inference step is needed to preserve labels of both the first element and the rest.
π Actual behavior
The following is inferred as
{ HEAD: unknown[]; TAIL: [b: 2, ...c: 3[]]; }
π Expected behavior
The expected type is
{ HEAD: [a:1]; TAIL: [b: 2, ...c: 3[]]; }
.The text was updated successfully, but these errors were encountered: