TypeScript/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt

14 lines
1 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts(1,27): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts(2,27): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts (2 errors) ====
var x1 = function foo3<T, U extends { a: T; b: string }>(x: T, z: U) { }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
2014-07-13 01:04:16 +02:00
var x2 = function foo3<T, U extends { a: T; b: number }>(x: T, z: U) { }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
2014-07-13 01:04:16 +02:00
x1 = x2;
x2 = x1;