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

75 lines
4.7 KiB
Plaintext

==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts (28 errors) ====
class C<U extends T, T extends U> { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! 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> { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
interface I<U extends T, T extends U> { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! 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> { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
function f<U extends T, T extends U>() { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! 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>() { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! 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;
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! 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;
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
}
var b = <U extends T, T extends U>() => { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! 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>() => { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! 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> { }
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.