overloadOnConstConstraintChecks2.ts(10,5): error TS2322: Type 'null' is not assignable to type 'A'.


==== overloadOnConstConstraintChecks2.ts (1 errors) ====
    class A {} 
    class B extends A {}
    class C extends A {
        public foo() { }
    }
    function foo(name: 'hi'): B;
    function foo(name: 'bye'): C;
    function foo(name: string): A;
    function foo(name: any): A {
        return null;
        ~~~~~~
!!! error TS2322: Type 'null' is not assignable to type 'A'.
    }