**TypeScript Version:** 2.8 **Code** ```ts type Identity<T> = T; function test( x: 'a' | 'b', y: Identity<typeof x>, ) { if (x === 'a') { const z = y; } } ``` **Expected behavior:** `x` has type `a` `z` has type `a` **Actual behavior:** `x` has type `a` `z` has type `a | b`