Description
If an interface has a function that returns any then a function on a class that returns void matches the interface and appears to invalidly fulfill the interface. This bug reproduces on the current playground and in the v0.8.3.0 build.
Repro steps
- Enter this code into foo.ts
interface IFoo {
bar(): any;
}
class Foo implements IFoo {
public bar(): void {
}
}
-
> tsc foo.ts
Expected:
An error telling me that Foo does not implement the interface IFoo.
Actual
No error occurs