TypeScript/tests/cases/compiler/noStrictGenericChecks.ts
Anders Hejlsberg 4e9e62d861 Add test
2017-06-12 13:17:24 -07:00

10 lines
198 B
TypeScript

// @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
}