TypeScript/tests/cases/compiler/noStrictGenericChecks.ts

10 lines
198 B
TypeScript
Raw Normal View History

2017-06-12 22:17:24 +02:00
// @noStrictGenericChecks: true
type A = <T, U>(x: T, y: U) => [T, U];
type B = <S>(x: S, y: S) => [S, S];
function f(a: A, b: B) {
a = b; // Error disabled here
b = a; // Ok
}