TypeScript/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt
2014-07-12 17:30:19 -07:00

17 lines
440 B
Plaintext

==== tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts (1 errors) ====
class A<T> {
x: T;
}
class B<U> extends A<string> {
y: U;
}
var x: A<number>;
var y: B<number>;
x = y; // error
~
!!! Type 'B<number>' is not assignable to type 'A<number>':
!!! Types of property 'x' are incompatible:
!!! Type 'string' is not assignable to type 'number'.