75 lines
5.1 KiB
Plaintext
75 lines
5.1 KiB
Plaintext
==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts (28 errors) ====
|
|
class C<U extends T, T extends U> { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
class C2<T extends U, U extends V, V extends T> { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
|
|
interface I<U extends T, T extends U> { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
interface I2<T extends U, U extends V, V extends T> { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
|
|
function f<U extends T, T extends U>() { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
function f2<T extends U, U extends V, V extends T>() { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
|
|
var a: {
|
|
<U extends T, T extends U>(): void;
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
<T extends U, U extends V, V extends T>(): void;
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
}
|
|
|
|
var b = <U extends T, T extends U>() => { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var b2 = <T extends U, U extends V, V extends T>() => { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
|
|
class D<U extends T, T extends V, V extends T> { }
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. |