tests/cases/compiler/functionLikeInParameterInitializer.ts(2,34): error TS2373: Initializer of parameter 'func' cannot reference identifier 'foo' declared after it.
tests/cases/compiler/functionLikeInParameterInitializer.ts(6,44): error TS2373: Initializer of parameter 'func' cannot reference identifier 'foo' declared after it.
tests/cases/compiler/functionLikeInParameterInitializer.ts(11,50): error TS2373: Initializer of parameter 'func' cannot reference identifier 'foo' declared after it.
tests/cases/compiler/functionLikeInParameterInitializer.ts(16,41): error TS2373: Initializer of parameter 'func' cannot reference identifier 'foo' declared after it.


==== tests/cases/compiler/functionLikeInParameterInitializer.ts (4 errors) ====
    // error
    export function bar(func = () => foo) {
                                     ~~~
!!! error TS2373: Initializer of parameter 'func' cannot reference identifier 'foo' declared after it.
        let foo = "in";
    }
    // error
    export function baz1(func = { f() { return foo } }) {
                                               ~~~
!!! error TS2373: Initializer of parameter 'func' cannot reference identifier 'foo' declared after it.
        let foo = "in";
    }
    
    // error
    export function baz2(func = function () { return foo }) {
                                                     ~~~
!!! error TS2373: Initializer of parameter 'func' cannot reference identifier 'foo' declared after it.
        let foo = "in";
    }
    
    // error
    export function baz3(func = class { x = foo }) {
                                            ~~~
!!! error TS2373: Initializer of parameter 'func' cannot reference identifier 'foo' declared after it.
        let foo = "in";
    }
    