==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts (18 errors) ==== // Type parameters are in scope in their own and other type parameter lists function foo(x: T, y: U): T { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ !!! Type 'U' is not assignable to type 'T'. return y; ~ !!! Type 'U' is not assignable to type 'T'. } function foo2(x: T, y: U): T { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ !!! Type 'U' is not assignable to type 'T'. return y; ~ !!! Type 'U' is not assignable to type 'T'. } var f = function (x: T, y: U): T { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ !!! Type 'U' is not assignable to type 'T'. return y; ~ !!! Type 'U' is not assignable to type 'T'. } var f2 = function (x: T, y: U): T { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ !!! Type 'U' is not assignable to type 'T'. return y; ~ !!! Type 'U' is not assignable to type 'T'. } var f3 = (x: T, y: U): T => { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ !!! Type 'U' is not assignable to type 'T'. return y; ~ !!! Type 'U' is not assignable to type 'T'. } var f4 = (x: T, y: U): T => { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y; ~ !!! Type 'U' is not assignable to type 'T'. return y; ~ !!! Type 'U' is not assignable to type 'T'. }