TypeScript/tests/baselines/reference/typeParameterAsBaseType.errors.txt
2015-06-15 10:44:21 -07:00

25 lines
1.2 KiB
Plaintext

tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(4,20): error TS2304: Cannot find name 'T'.
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(5,24): error TS2304: Cannot find name 'U'.
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(7,24): error TS2312: An interface may only extend a class or another interface.
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(8,28): error TS2312: An interface may only extend a class or another interface.
==== tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts (4 errors) ====
// type parameters cannot be used as base types
// these are all errors
class C<T> extends T { }
~
!!! error TS2304: Cannot find name 'T'.
class C2<T, U> extends U { }
~
!!! error TS2304: Cannot find name 'U'.
interface I<T> extends T { }
~
!!! error TS2312: An interface may only extend a class or another interface.
interface I2<T, U> extends U { }
~
!!! error TS2312: An interface may only extend a class or another interface.