<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.2.0 **Code** ```ts type T = 'a' | 'b' const f1 = () => true ? 'a' : 'b' const f2 = () => true ? 'a' : 'a' const v1: T = f1() const v2: T = f2() ``` **Expected behavior:** Both will be ok. **Actual behavior:** Only the former is ok. ``` index.ts(7,7): error TS2322: Type 'string' is not assignable to type 'T'. ```