tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts(3,17): error TS2810: Property '#prop' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts(7,13): error TS2810: Property '#prop' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts(11,17): error TS2810: Property '#prop' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts(12,17): error TS2810: Property '#foo' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts(19,21): error TS2810: Property '#prop' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.


==== tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts (5 errors) ====
    class TestWithErrors {
        #prop = 0 
        static dd = new TestWithErrors().#prop; // Err
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2810: Property '#prop' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
!!! related TS2811 tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts:3:12: Initializer for property 'dd'
        static ["X_ z_ zz"] = class Inner {
            #foo  = 10   
            m() {
                new TestWithErrors().#prop // Err
                ~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2810: Property '#prop' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
!!! related TS2811 tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts:4:12: Initializer for property 'X_ z_ zz'
            }
            static C = class InnerInner {
                m() {
                    new TestWithErrors().#prop // Err
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2810: Property '#prop' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
!!! related TS2811 tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts:4:12: Initializer for property 'X_ z_ zz'
                    new Inner().#foo; // Err
                    ~~~~~~~~~~~~~~~~
!!! error TS2810: Property '#foo' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
!!! related TS2811 tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts:9:16: Initializer for property 'C'
                }
            }
    
            static M(){
                return class {
                    m() {
                        new TestWithErrors().#prop // Err
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2810: Property '#prop' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.
!!! related TS2811 tests/cases/conformance/classes/members/privateNames/privateNameErrorsOnNotUseDefineForClassFieldsInEsNext.ts:4:12: Initializer for property 'X_ z_ zz'
                        new Inner().#foo; // OK
                    }
                }
            } 
        }
    }
    
    class TestNoErrors {
        #prop = 0 
        dd = new TestNoErrors().#prop; // OK
        ["X_ z_ zz"] = class Inner {
            #foo  = 10   
            m() {
                new TestNoErrors().#prop // Ok
            }
            C = class InnerInner {
                m() {
                    new TestNoErrors().#prop // Ok
                    new Inner().#foo; // Ok
                }
            }
      
            static M(){
                return class {
                    m() {
                        new TestNoErrors().#prop // OK
                        new Inner().#foo; // OK
                    }
                }
            } 
        }
      }