**TypeScript Version:** 2.8 **Code** ```ts function test<T extends 'a' | 'b'>(x: T) { if (x === 'a') { const z1 = x; } } function test2(x: 'a' | 'b') { if (x === 'a') { const z2 = x; } } ``` **Expected behavior:** `z1` and `z2` should have the same type, which is `a` **Actual behavior:** `function test` is unable to narrow parameter x, with the if check, and `z2` resolves to `x`