TypeScript/tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts
Andy fe3a05e89a A function should be context-sensitive if its return expression is (#17697)
* A function should be context-sensitive if its return expression is

* Remove outdated comment

* Fix typo
2017-08-10 07:08:24 -07:00

3 lines
149 B
TypeScript

var f10: <T>(x: T, b: () => (a: T) => void, y: T) => T;
f10('', () => a => a.foo, ''); // a is ""
var r9 = f10('', () => (a => a.foo), 1); // error