116 lines
No EOL
7 KiB
Text
116 lines
No EOL
7 KiB
Text
==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterUsedAsConstraint.ts (40 errors) ====
|
|
class C<T, U extends T> { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
class C2<T extends U, U> { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
class C3<T extends Date, U extends T> { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
class C4<T extends U, U extends Date> { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
class C5<T extends U, U extends V, V> { }
|
|
~~~~~~~~~~~
|
|
!!! 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 C6<T, U extends T, V 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 I<T, U extends T> { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
interface I2<T extends U, U> { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
interface I3<T extends Date, U extends T> { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
interface I4<T extends U, U extends Date> { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
interface I5<T extends U, U extends V, V> { }
|
|
~~~~~~~~~~~
|
|
!!! 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 I6<T, U extends T, V 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 f<T, U extends T>() { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
function f2<T extends U, U>() { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
function f3<T extends Date, U extends T>() { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
function f4<T extends U, U extends Date>() { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
function f5<T extends U, U extends V, V>() { }
|
|
~~~~~~~~~~~
|
|
!!! 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 f6<T, U extends T, V 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 e = <T, U extends T>() => { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var e2 = <T extends U, U>() => { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var e3 = <T extends Date, U extends T>() => { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var e4 = <T extends U, U extends Date>() => { }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var e5 = <T extends U, U extends V, V>() => { }
|
|
~~~~~~~~~~~
|
|
!!! 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 e6 = <T, U extends T, V 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 a: { <T, U extends T>(): void }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var a2: { <T extends U, U>(): void }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var a3: { <T extends Date, U extends T>(): void }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var a4: { <T extends U, U extends Date>(): void }
|
|
~~~~~~~~~~~
|
|
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
var a5: { <T extends U, U extends V, V>(): 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.
|
|
var a6: { <T, U extends T, V 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.
|
|
|