Closed
Description
Compile the following using noImplicitAny:
function foo<T>(x: T): T { return x }
interface I {
x: string;
}
var i: I = foo({ x: null }); // Error
var s: string = f(null); // No error
Neither of these should be errors. According to the spec, both of these should widen, but in #531 @DanielRosenwasser and I explain why these should not widen.
The noImplicitAny error resulting from widening is a breaking change from 1.0, and it broke a customer.