Closed

Description
TypeScript Version: nightly (2.5.0-dev.20170629)
Code
interface I { m(): number; }
const o: I = { m() { throw new Error("not implemented"); } }
Expected behavior:
No error.
Actual behavior:
Type '() => void' is not assignable to type '() => number'.
The same problem occurs inside a class. Manually annotating m(): number
fixes the problem, but shouldn't we get that from the contextual type anyway?