2014-10-28 08:28:59 +01:00
|
|
|
tests/cases/compiler/incompatibleGenericTypes.ts(10,5): error TS2323: Type 'I1<boolean>' is not assignable to type 'I1<number>'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Type 'boolean' is not assignable to type 'number'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/incompatibleGenericTypes.ts (1 errors) ====
|
|
|
|
|
|
|
|
interface I1<T> {
|
|
|
|
|
|
|
|
m1<U>(callback: (p: T) => U): I1<U>;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var v1: I1<boolean>;
|
|
|
|
|
|
|
|
var v2: I1<number> = v1;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~
|
2014-10-28 08:28:59 +01:00
|
|
|
!!! error TS2323: Type 'I1<boolean>' is not assignable to type 'I1<number>'.
|
|
|
|
!!! error TS2323: Type 'boolean' is not assignable to type 'number'.
|