==== tests/cases/compiler/genericCallWithConstraintsTypeArgumentInference2.ts (3 errors) ====
    // Generic call with parameters of T and U, U extends T, no parameter of type U
    
    function foo<T, U extends T>(t: T) {
                    ~~~~~~~~~~~
!!! genericCallWithConstraintsTypeArgumentInference2.ts(3,17): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
        var u: U;
        return u;
    }
    
    var r = foo(1); // ok
    var r2 = foo(null); // {}
    var r3 = foo(new Object()); // {}
    var r4 = foo<Date, Date>(1); // error
             ~~~
!!! genericCallWithConstraintsTypeArgumentInference2.ts(11,10): error TS2082: Supplied parameters do not match any signature of call target:
!!! 	Type 'Number' is missing property 'toDateString' from type 'Date'.
             ~~~
!!! genericCallWithConstraintsTypeArgumentInference2.ts(11,10): error TS2087: Could not select overload for 'call' expression.
    var r5 = foo<Date, Date>(new Date()); // no error