33 lines
No EOL
1.5 KiB
Text
33 lines
No EOL
1.5 KiB
Text
tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(4,5): error TS2323: Type 'U' is not assignable to type 'T'.
|
|
tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(5,5): error TS2323: Type 'V' is not assignable to type 'T'.
|
|
tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(6,5): error TS2323: Type 'T' is not assignable to type 'V'.
|
|
tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(7,5): error TS2323: Type 'V' is not assignable to type 'U'.
|
|
tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(8,5): error TS2323: Type 'U' is not assignable to type 'V'.
|
|
tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(9,5): error TS2323: Type 'Object' is not assignable to type 'T'.
|
|
|
|
|
|
==== tests/cases/compiler/typeParametersShouldNotBeEqual2.ts (6 errors) ====
|
|
function ff<T extends Date, U extends Date, V>(x: T, y: U, z: V) {
|
|
var zz: Object;
|
|
x = x; // Ok
|
|
x = y; // Ok
|
|
~
|
|
!!! error TS2323: Type 'U' is not assignable to type 'T'.
|
|
x = z; // Error
|
|
~
|
|
!!! error TS2323: Type 'V' is not assignable to type 'T'.
|
|
z = x; // Error
|
|
~
|
|
!!! error TS2323: Type 'T' is not assignable to type 'V'.
|
|
y = z; // Error
|
|
~
|
|
!!! error TS2323: Type 'V' is not assignable to type 'U'.
|
|
z = y; // Error
|
|
~
|
|
!!! error TS2323: Type 'U' is not assignable to type 'V'.
|
|
x = zz; // Error
|
|
~
|
|
!!! error TS2323: Type 'Object' is not assignable to type 'T'.
|
|
zz = x; // Ok
|
|
}
|
|
|