<!-- 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:** nightly (2.2.0) **Code** ```ts function id<T>(x: T): T { return x; } function stringId(x: string): string { return x; } function numberId(x: number): number { return x; } // OK: ((x: string) => string) | ((x: number) => number) const f = true ? numberId : stringId; // Actual: <T>(x: T) => T // Expected: (x: string) => string const g = true ? id : stringId; ``` **Expected behavior:** Union between a function and a generic function should yield the most specific type, not the most general one.