==== tests/cases/compiler/functionWithMultipleReturnStatements.ts (8 errors) ====
    // return type of a function with multiple returns is the BCT of each return statement
    // it is an error if there is no single BCT, these are error cases
    
    function f1() {
    ~~~~~~~~~~~~~~~
        if (true) {
    ~~~~~~~~~~~~~~~
            return 1;
    ~~~~~~~~~~~~~~~~~
        } else {
    ~~~~~~~~~~~~
            return '';
    ~~~~~~~~~~~~~~~~~~
        }
    ~~~~~
    }
    ~
!!! functionWithMultipleReturnStatements.ts(4,1): error TS2198: Could not find the best common type of types of all return statement expressions.
    
    function f2() {
    ~~~~~~~~~~~~~~~
        if (true) {
    ~~~~~~~~~~~~~~~
            return 1;
    ~~~~~~~~~~~~~~~~~
        } else if (false) {
    ~~~~~~~~~~~~~~~~~~~~~~~
            return 2;
    ~~~~~~~~~~~~~~~~~
        } else {
    ~~~~~~~~~~~~
            return '';
    ~~~~~~~~~~~~~~~~~~
        }
    ~~~~~
    }
    ~
!!! functionWithMultipleReturnStatements.ts(12,1): error TS2198: Could not find the best common type of types of all return statement expressions.
    
    function f3() {
    ~~~~~~~~~~~~~~~
        try {
    ~~~~~~~~~
            return 1;
    ~~~~~~~~~~~~~~~~~
        }
    ~~~~~
        catch (e) {
    ~~~~~~~~~~~~~~~
            return '';
    ~~~~~~~~~~~~~~~~~~
        }
    ~~~~~
    }
    ~
!!! functionWithMultipleReturnStatements.ts(22,1): error TS2198: Could not find the best common type of types of all return statement expressions.
    
    function f4() {
    ~~~~~~~~~~~~~~~
        try {
    ~~~~~~~~~
            return 1;
    ~~~~~~~~~~~~~~~~~
        }
    ~~~~~
        catch (e) {
    ~~~~~~~~~~~~~~~
    
    
        }
    ~~~~~
        finally {
    ~~~~~~~~~~~~~
            return '';
    ~~~~~~~~~~~~~~~~~~
        }
    ~~~~~
    }
    ~
!!! functionWithMultipleReturnStatements.ts(31,1): error TS2198: Could not find the best common type of types of all return statement expressions.
    
    function f5() {
    ~~~~~~~~~~~~~~~
        return 1;
    ~~~~~~~~~~~~~
        return '';
    ~~~~~~~~~~~~~~
    }
    ~
!!! functionWithMultipleReturnStatements.ts(43,1): error TS2198: Could not find the best common type of types of all return statement expressions.
    
    function f6<T, U>(x: T, y:U) {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        if (true) {
    ~~~~~~~~~~~~~~~
            return x;
    ~~~~~~~~~~~~~~~~~
        } else {
    ~~~~~~~~~~~~
            return y;
    ~~~~~~~~~~~~~~~~~
        }
    ~~~~~
    }
    ~
!!! functionWithMultipleReturnStatements.ts(48,1): error TS2198: Could not find the best common type of types of all return statement expressions.
    
    function f8<T extends U, U extends V, V>(x: T, y: U) {
                ~~~~~~~~~~~
!!! functionWithMultipleReturnStatements.ts(56,13): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
                             ~~~~~~~~~~~
!!! functionWithMultipleReturnStatements.ts(56,26): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
        if (true) {
            return x;
        } else {
            return y;
        }
    }
    