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

18 lines
1.6 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/recursiveGenericTypeHierarchy.ts(2,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/recursiveGenericTypeHierarchy.ts(2,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/recursiveGenericTypeHierarchy.ts(3,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/recursiveGenericTypeHierarchy.ts(3,32): 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/recursiveGenericTypeHierarchy.ts (4 errors) ====
// used to ICE
interface A<T extends A<T, S>, S extends A<T, S>> { }
~~~~~~~~~~~~~~~~~
!!! 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
~~~~~~~~~~~~~~~~~
!!! 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
interface B<T extends B<T, S>, S extends B<T, S>> extends A<B<T, S>, B<T, S>> { }
~~~~~~~~~~~~~~~~~
!!! 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
~~~~~~~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.