==== tests/cases/compiler/genericCallWithObjectTypeArgsAndInitializers.ts (9 errors) ====
    // Generic typed parameters with initializers
    
    function foo<T>(x: T = null) { return x; } // ok
    function foo2<T>(x: T = undefined) { return x; } // ok
    function foo3<T extends Number>(x: T = 1) { } // error
                                    ~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2011: Cannot convert 'number' to 'T'.
    function foo4<T, U extends T>(x: T, y: U = x) { } // error
                     ~~~~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(6,18): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
                                        ~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(6,37): error TS2011: Cannot convert 'T' to 'U'.
    function foo5<T, U extends T>(x: U, y: T = x) { } // ok
                     ~~~~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(7,18): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
    function foo6<T, U extends T, V extends U>(x: T, y: U, z: V = y) { } // error
                     ~~~~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(8,18): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
                                  ~~~~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(8,31): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
                                                           ~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(8,56): error TS2011: Cannot convert 'U' to 'V'.
    function foo7<T, U extends T, V extends U>(x: V, y: U = x) { } // should be ok
                     ~~~~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(9,18): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
                                  ~~~~~~~~~~~
!!! genericCallWithObjectTypeArgsAndInitializers.ts(9,31): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.