fd5b80805e
The new baselines all look correct to me, but obviously a number of the tests need to be updated to reflect union types and the new behavior of best common type. This commit does not cover that.
17 lines
1.1 KiB
Plaintext
17 lines
1.1 KiB
Plaintext
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceTransitiveConstraints.ts(2,29): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceTransitiveConstraints.ts(2,42): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
|
|
|
|
==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceTransitiveConstraints.ts (2 errors) ====
|
|
|
|
function fn<A extends Date, B extends A, C extends B>(a: A, b: B, c: C) {
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
return [a, b, c];
|
|
}
|
|
|
|
var d = fn(new Date(), new Date(), new Date());
|
|
var d: Date[]; // Should be OK (d should be Date[])
|
|
|