TypeScript/tests/baselines/reference/typeParameterWithInvalidConstraintType.errors.txt

16 lines
671 B
Plaintext
Raw Normal View History

tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/typeParameterWithInvalidConstraintType.ts (1 errors) ====
class A<T extends T> {
~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
2014-07-13 01:04:16 +02:00
foo() {
var x: T;
// no error expected below this line
var a = x.foo();
var b = new x(123);
var c = x[1];
var d = x();
}
}