2014-10-28 08:28:59 +01:00
|
|
|
tests/cases/compiler/typeParameterArgumentEquivalence4.ts(4,5): error TS2323: Type '(item: any) => T' is not assignable to type '(item: any) => U'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Type 'T' is not assignable to type 'U'.
|
2014-10-28 08:28:59 +01:00
|
|
|
tests/cases/compiler/typeParameterArgumentEquivalence4.ts(5,5): error TS2323: Type '(item: any) => U' is not assignable to type '(item: any) => T'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Type 'U' is not assignable to type 'T'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/typeParameterArgumentEquivalence4.ts (2 errors) ====
|
|
|
|
function foo<T,U>() {
|
|
|
|
var x: (item) => U;
|
|
|
|
var y: (item) => T;
|
|
|
|
x = y; // Should be an error
|
|
|
|
~
|
2014-10-28 08:28:59 +01:00
|
|
|
!!! error TS2323: Type '(item: any) => T' is not assignable to type '(item: any) => U'.
|
|
|
|
!!! error TS2323: Type 'T' is not assignable to type 'U'.
|
2014-07-13 01:04:16 +02:00
|
|
|
y = x; // Shound be an error
|
|
|
|
~
|
2014-10-28 08:28:59 +01:00
|
|
|
!!! error TS2323: Type '(item: any) => U' is not assignable to type '(item: any) => T'.
|
|
|
|
!!! error TS2323: Type 'U' is not assignable to type 'T'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|