Open
Description
Apologies for the vague title, I can't quite pin down the cause of this, hence the poor wording
$ tsc --version
1.9.0-dev.20160208
The problem is best described using the following example:
// using --noImplicitAny
let a = undefined; // OK: error as expected: Variable 'a' implicitly has an 'any' type.
function mine<T>(meth: () => T): T {
return meth();
}
// **Problem**: x has type 'any' below
// Should be a compiler error
let x = mine(() => {
return undefined;
});