Open
Description
const num = 1;
function check<T extends unknown>(x: T) {
return x === num;
}
check(num);
Expected: Error: This condition will always return 'false' since the types 'T' and '1' have no overlap.
Actual: No error.
Contrast this with the following example from #32768.
const num = 1;
function check<T>(x: T) {
return x === num;
}
check(num);