tests/cases/conformance/types/witness/witness.ts(4,21): error TS2372: Parameter 'pInit' cannot be referenced in its initializer.
tests/cases/conformance/types/witness/witness.ts(8,14): error TS2729: Property 'x' is used before its initialization.
tests/cases/conformance/types/witness/witness.ts(28,12): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/conformance/types/witness/witness.ts(29,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'co1' must be of type 'any', but here has type 'number'.
tests/cases/conformance/types/witness/witness.ts(30,12): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/conformance/types/witness/witness.ts(30,12): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/conformance/types/witness/witness.ts(32,12): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/conformance/types/witness/witness.ts(32,12): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/conformance/types/witness/witness.ts(32,12): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/conformance/types/witness/witness.ts(33,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'co3' must be of type 'any', but here has type 'number'.
tests/cases/conformance/types/witness/witness.ts(37,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'as1' must be of type 'any', but here has type 'number'.
tests/cases/conformance/types/witness/witness.ts(39,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'as2' must be of type 'any', but here has type 'number'.
tests/cases/conformance/types/witness/witness.ts(43,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'cnd1' must be of type 'any', but here has type 'number'.
tests/cases/conformance/types/witness/witness.ts(57,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'and1' must be of type 'any', but here has type 'string'.
tests/cases/conformance/types/witness/witness.ts(110,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'propAcc1' must be of type 'any', but here has type '{ m: any; }'.
tests/cases/conformance/types/witness/witness.ts(121,14): error TS2729: Property 'n' is used before its initialization.
tests/cases/conformance/types/witness/witness.ts(128,19): error TS2729: Property 'q' is used before its initialization.


==== tests/cases/conformance/types/witness/witness.ts (17 errors) ====
    // Initializers
    var varInit = varInit; // any
    var pInit: any;
    function fn(pInit = pInit) {
                        ~~~~~
!!! error TS2372: Parameter 'pInit' cannot be referenced in its initializer.
        var pInit: any;
    }
    class InitClass {
        x = this.x;
                 ~
!!! error TS2729: Property 'x' is used before its initialization.
!!! related TS2728 tests/cases/conformance/types/witness/witness.ts:8:5: 'x' is declared here.
        fn() {
            var y = this.x;
            var y: any;
        }
    }
    
    // Return type
    function fnReturn1() {
        return fnReturn1();
    }
    var a: any;
    var a = fnReturn1();
    
    function fnReturn2() {
        return fnReturn2;
    }
    var fnr2: () => any = fnReturn2();
    
    // Comma
    var co1 = (co1, 3);
               ~~~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
    var co1: number;
        ~~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'co1' must be of type 'any', but here has type 'number'.
!!! related TS6203 tests/cases/conformance/types/witness/witness.ts:28:5: 'co1' was also declared here.
    var co2 = (3, 4, co2);
               ~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
               ~~~~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
    var co2: any;
    var co3 = (co1, co2, co3, co1);
               ~~~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
               ~~~~~~~~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
               ~~~~~~~~~~~~~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
    var co3: number;
        ~~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'co3' must be of type 'any', but here has type 'number'.
!!! related TS6203 tests/cases/conformance/types/witness/witness.ts:32:5: 'co3' was also declared here.
    
    // Assignment
    var as1 = (as1 = 2);
    var as1: number;
        ~~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'as1' must be of type 'any', but here has type 'number'.
!!! related TS6203 tests/cases/conformance/types/witness/witness.ts:36:5: 'as1' was also declared here.
    var as2 = (as2 = as2 = 2);
    var as2: number;
        ~~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'as2' must be of type 'any', but here has type 'number'.
!!! related TS6203 tests/cases/conformance/types/witness/witness.ts:38:5: 'as2' was also declared here.
    
    // Conditional
    var cnd1 = cnd1 ? 0 : 1;
    var cnd1: number;
        ~~~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'cnd1' must be of type 'any', but here has type 'number'.
!!! related TS6203 tests/cases/conformance/types/witness/witness.ts:42:5: 'cnd1' was also declared here.
    var cnd2 = cnd1 ? cnd1 ? '' : "" : '';
    var cnd2: string;
    
    // ||
    var or1 = or1 || '';
    var or1: any;
    var or2 = '' || or2;
    var or2: any;
    var or3 = or3 || or3;
    var or3: any;
    
    // &&
    var and1 = and1 && '';
    var and1: string;
        ~~~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'and1' must be of type 'any', but here has type 'string'.
!!! related TS6203 tests/cases/conformance/types/witness/witness.ts:56:5: 'and1' was also declared here.
    var and2 = '' && and2;
    var and2: any;
    var and3 = and3 && and3;
    var and3: any;
    
    // function call return type
    function fnCall() {
        return fnCall();
    }
    var fnCallResult = fnCall();
    var fnCallResult: any;
    
    // Call argument
    function fnArg1(x: typeof fnArg1, y: number) {
        var x: (n: typeof fnArg1, m: number) => void;
        fnArg1(fnArg1, 0);
    }
    
    function overload1(x: (n: string) => string): string;
    function overload1(x: (n: number) => number): number;
    function overload1(x: (n: any) => any): any;
    function overload1() { return undefined; };
    
    function fnArg2() {
        return overload1(fnArg2);
    }
    var t = fnArg2(); // t: should be 'any', but is 'string'
    
    // New operator
    class C {
        fn1() {
            return new (this.fn1())();
        }
        fn2() {
            return new (this.fn2());
        }
        fn3() {
            var a: new(x) => number;
            return new a(this.fn3);
        }
    }
    
    function fn5() {
        var a: new (x) => number;
        return new a(fn5);
    }
    var fn5r = fn5(); // fn5r: should be 'any', but is 'number'
    
    // Property access
    var propAcc1 = {
        m: propAcc1.m
    };
    var propAcc1: { m: any; }
        ~~~~~~~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'propAcc1' must be of type 'any', but here has type '{ m: any; }'.
!!! related TS6203 tests/cases/conformance/types/witness/witness.ts:107:5: 'propAcc1' was also declared here.
    
    // Property access of module member
    module M2 {
        export var x = M2.x;
        var y = x;
        var y: any;
    }
    
    // Property access of class instance type
    class C2 {
        n = this.n; // n: any
                 ~
!!! error TS2729: Property 'n' is used before its initialization.
!!! related TS2728 tests/cases/conformance/types/witness/witness.ts:121:5: 'n' is declared here.
    }
    var c2inst = new C2().n;
    var c2inst: any;
    
    // Constructor function property access
    class C3 {
        static q = C3.q;
                      ~
!!! error TS2729: Property 'q' is used before its initialization.
!!! related TS2728 tests/cases/conformance/types/witness/witness.ts:128:12: 'q' is declared here.
    }
    var qq = C3.q;
    var qq: any;
    
    // Parentheses - tested a bunch above
    
    
    