tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(253,44): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(259,31): error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(265,20): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(271,13): error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(361,48): error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(365,35): error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(405,44): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(408,31): error TS4043: Return type of public property getter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(411,20): error TS4039: Return type of public static property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(414,13): error TS4042: Return type of public property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(420,48): error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts(422,35): error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(9,40): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(15,27): error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(21,16): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(27,9): error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(117,44): error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(121,31): error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(161,40): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(164,27): error TS4043: Return type of public property getter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(167,16): error TS4039: Return type of public static property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(170,9): error TS4042: Return type of public property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(176,44): error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(178,31): error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(211,44): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(217,31): error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(223,20): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(229,13): error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(319,48): error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(323,35): error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateClass'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(363,44): error TS4040: Return type of public static property getter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(366,31): error TS4043: Return type of public property getter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(369,20): error TS4039: Return type of public static property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(372,13): error TS4042: Return type of public property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(378,48): error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateModule'.
tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts(380,35): error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateModule'.


==== tests/cases/compiler/privacyAccessorDeclFile_externalModule.ts (24 errors) ====
    
    class privateClass {
    }
    
    export class publicClass {
    }
    
    export class publicClassWithWithPrivateGetAccessorTypes {
        static get myPublicStaticMethod(): privateClass { // Error
                                           ~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
            return null;
        }
        private static get myPrivateStaticMethod(): privateClass {
            return null;
        }
        get myPublicMethod(): privateClass { // Error
                              ~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
            return null;
        }
        private get myPrivateMethod(): privateClass {
            return null;
        }
        static get myPublicStaticMethod1() { // Error
                   ~~~~~~~~~~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
            return new privateClass();
        }
        private static get myPrivateStaticMethod1() {
            return new privateClass();
        }
        get myPublicMethod1() { // Error
            ~~~~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
            return new privateClass();
        }
        private get myPrivateMethod1() {
            return new privateClass();
        }
    }
    
    export class publicClassWithWithPublicGetAccessorTypes {
        static get myPublicStaticMethod(): publicClass {
            return null;
        }
        private static get myPrivateStaticMethod(): publicClass {
            return null;
        }
        get myPublicMethod(): publicClass {
            return null;
        }
        private get myPrivateMethod(): publicClass {
            return null;
        }
        static get myPublicStaticMethod1() {
            return new publicClass();
        }
        private static get myPrivateStaticMethod1() {
            return new publicClass();
        }
        get myPublicMethod1() {
            return new publicClass();
        }
        private get myPrivateMethod1() {
            return new publicClass();
        }
    }
    
    class privateClassWithWithPrivateGetAccessorTypes {
        static get myPublicStaticMethod(): privateClass {
            return null;
        }
        private static get myPrivateStaticMethod(): privateClass {
            return null;
        }
        get myPublicMethod(): privateClass {
            return null;
        }
        private get myPrivateMethod(): privateClass {
            return null;
        }
        static get myPublicStaticMethod1() {
            return new privateClass();
        }
        private static get myPrivateStaticMethod1() {
            return new privateClass();
        }
        get myPublicMethod1() {
            return new privateClass();
        }
        private get myPrivateMethod1() {
            return new privateClass();
        }
    }
    
    class privateClassWithWithPublicGetAccessorTypes {
        static get myPublicStaticMethod(): publicClass {
            return null;
        }
        private static get myPrivateStaticMethod(): publicClass {
            return null;
        }
        get myPublicMethod(): publicClass {
            return null;
        }
        private get myPrivateMethod(): publicClass {
            return null;
        }
        static get myPublicStaticMethod1() {
            return new publicClass();
        }
        private static get myPrivateStaticMethod1() {
            return new publicClass();
        }
        get myPublicMethod1() {
            return new publicClass();
        }
        private get myPrivateMethod1() {
            return new publicClass();
        }
    }
    
    export class publicClassWithWithPrivateSetAccessorTypes {
        static set myPublicStaticMethod(param: privateClass) { // Error
                                               ~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateClass'.
        }
        private static set myPrivateStaticMethod(param: privateClass) {
        }
        set myPublicMethod(param: privateClass) { // Error
                                  ~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateClass'.
        }
        private set myPrivateMethod(param: privateClass) {
        }
    }
    
    export class publicClassWithWithPublicSetAccessorTypes {
        static set myPublicStaticMethod(param: publicClass) {
        }
        private static set myPrivateStaticMethod(param: publicClass) {
        }
        set myPublicMethod(param: publicClass) {
        }
        private set myPrivateMethod(param: publicClass) {
        }
    }
    
    class privateClassWithWithPrivateSetAccessorTypes {
        static set myPublicStaticMethod(param: privateClass) {
        }
        private static set myPrivateStaticMethod(param: privateClass) {
        }
        set myPublicMethod(param: privateClass) { 
        }
        private set myPrivateMethod(param: privateClass) {
        }
    }
    
    class privateClassWithWithPublicSetAccessorTypes {
        static set myPublicStaticMethod(param: publicClass) {
        }
        private static set myPrivateStaticMethod(param: publicClass) {
        }
        set myPublicMethod(param: publicClass) {
        }
        private set myPrivateMethod(param: publicClass) {
        }
    }
    
    export class publicClassWithPrivateModuleGetAccessorTypes {
        static get myPublicStaticMethod(): privateModule.publicClass { // Error
                                           ~~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateModule'.
            return null;
        }
        get myPublicMethod(): privateModule.publicClass { // Error
                              ~~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateModule'.
            return null;
        }
        static get myPublicStaticMethod1() { // Error
                   ~~~~~~~~~~~~~~~~~~~~~
!!! error TS4039: Return type of public static property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
            return new privateModule.publicClass();
        }
        get myPublicMethod1() { // Error
            ~~~~~~~~~~~~~~~
!!! error TS4042: Return type of public property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
            return new privateModule.publicClass();
        }
    }
    
    export class publicClassWithPrivateModuleSetAccessorTypes {
        static set myPublicStaticMethod(param: privateModule.publicClass) { // Error
                                               ~~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateModule'.
        }
        set myPublicMethod(param: privateModule.publicClass) { // Error
                                  ~~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateModule'.
        }
    }
    
    class privateClassWithPrivateModuleGetAccessorTypes {
        static get myPublicStaticMethod(): privateModule.publicClass {
            return null;
        }
        get myPublicMethod(): privateModule.publicClass {
            return null;
        }
        static get myPublicStaticMethod1() {
            return new privateModule.publicClass();
        }
        get myPublicMethod1() {
            return new privateModule.publicClass();
        }
    }
    
    class privateClassWithPrivateModuleSetAccessorTypes {
        static set myPublicStaticMethod(param: privateModule.publicClass) {
        }
        set myPublicMethod(param: privateModule.publicClass) {
        }
    }
    
    export module publicModule {
        class privateClass {
        }
    
        export class publicClass {
        }
        export class publicClassWithWithPrivateGetAccessorTypes {
            static get myPublicStaticMethod(): privateClass { // Error
                                               ~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
                return null;
            }
            private static get myPrivateStaticMethod(): privateClass {
                return null;
            }
            get myPublicMethod(): privateClass { // Error
                                  ~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
                return null;
            }
            private get myPrivateMethod(): privateClass {
                return null;
            }
            static get myPublicStaticMethod1() { // Error
                       ~~~~~~~~~~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
                return new privateClass();
            }
            private static get myPrivateStaticMethod1() {
                return new privateClass();
            }
            get myPublicMethod1() { // Error
                ~~~~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
                return new privateClass();
            }
            private get myPrivateMethod1() {
                return new privateClass();
            }
        }
    
        export class publicClassWithWithPublicGetAccessorTypes {
            static get myPublicStaticMethod(): publicClass {
                return null;
            }
            private static get myPrivateStaticMethod(): publicClass {
                return null;
            }
            get myPublicMethod(): publicClass {
                return null;
            }
            private get myPrivateMethod(): publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new publicClass();
            }
            private static get myPrivateStaticMethod1() {
                return new publicClass();
            }
            get myPublicMethod1() {
                return new publicClass();
            }
            private get myPrivateMethod1() {
                return new publicClass();
            }
        }
    
        class privateClassWithWithPrivateGetAccessorTypes {
            static get myPublicStaticMethod(): privateClass {
                return null;
            }
            private static get myPrivateStaticMethod(): privateClass {
                return null;
            }
            get myPublicMethod(): privateClass {
                return null;
            }
            private get myPrivateMethod(): privateClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new privateClass();
            }
            private static get myPrivateStaticMethod1() {
                return new privateClass();
            }
            get myPublicMethod1() {
                return new privateClass();
            }
            private get myPrivateMethod1() {
                return new privateClass();
            }
        }
    
        class privateClassWithWithPublicGetAccessorTypes {
            static get myPublicStaticMethod(): publicClass {
                return null;
            }
            private static get myPrivateStaticMethod(): publicClass {
                return null;
            }
            get myPublicMethod(): publicClass {
                return null;
            }
            private get myPrivateMethod(): publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new publicClass();
            }
            private static get myPrivateStaticMethod1() {
                return new publicClass();
            }
            get myPublicMethod1() {
                return new publicClass();
            }
            private get myPrivateMethod1() {
                return new publicClass();
            }
        }
    
        export class publicClassWithWithPrivateSetAccessorTypes {
            static set myPublicStaticMethod(param: privateClass) { // Error
                                                   ~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateClass'.
            }
            private static set myPrivateStaticMethod(param: privateClass) {
            }
            set myPublicMethod(param: privateClass) { // Error
                                      ~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateClass'.
            }
            private set myPrivateMethod(param: privateClass) {
            }
        }
    
        export class publicClassWithWithPublicSetAccessorTypes {
            static set myPublicStaticMethod(param: publicClass) {
            }
            private static set myPrivateStaticMethod(param: publicClass) {
            }
            set myPublicMethod(param: publicClass) {
            }
            private set myPrivateMethod(param: publicClass) {
            }
        }
    
        class privateClassWithWithPrivateSetAccessorTypes {
            static set myPublicStaticMethod(param: privateClass) {
            }
            private static set myPrivateStaticMethod(param: privateClass) {
            }
            set myPublicMethod(param: privateClass) {
            }
            private set myPrivateMethod(param: privateClass) {
            }
        }
    
        class privateClassWithWithPublicSetAccessorTypes {
            static set myPublicStaticMethod(param: publicClass) {
            }
            private static set myPrivateStaticMethod(param: publicClass) {
            }
            set myPublicMethod(param: publicClass) {
            }
            private set myPrivateMethod(param: publicClass) {
            }
        }
    
        export class publicClassWithPrivateModuleGetAccessorTypes {
            static get myPublicStaticMethod(): privateModule.publicClass { // Error
                                               ~~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateModule'.
                return null;
            }
            get myPublicMethod(): privateModule.publicClass { // Error
                                  ~~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateModule'.
                return null;
            }
            static get myPublicStaticMethod1() { // Error
                       ~~~~~~~~~~~~~~~~~~~~~
!!! error TS4039: Return type of public static property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
                return new privateModule.publicClass();
            }
            get myPublicMethod1() { // Error
                ~~~~~~~~~~~~~~~
!!! error TS4042: Return type of public property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
                return new privateModule.publicClass();
            }
        }
    
        export class publicClassWithPrivateModuleSetAccessorTypes {
            static set myPublicStaticMethod(param: privateModule.publicClass) { // Error
                                                   ~~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateModule'.
            }
            set myPublicMethod(param: privateModule.publicClass) { // Error
                                      ~~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateModule'.
            }
        }
    
        class privateClassWithPrivateModuleGetAccessorTypes {
            static get myPublicStaticMethod(): privateModule.publicClass {
                return null;
            }
            get myPublicMethod(): privateModule.publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new privateModule.publicClass();
            }
            get myPublicMethod1() {
                return new privateModule.publicClass();
            }
        }
    
        class privateClassWithPrivateModuleSetAccessorTypes {
            static set myPublicStaticMethod(param: privateModule.publicClass) {
            }
            set myPublicMethod(param: privateModule.publicClass) {
            }
        }
    }
    
    module privateModule {
        class privateClass {
        }
    
        export class publicClass {
        }
        export class publicClassWithWithPrivateGetAccessorTypes {
            static get myPublicStaticMethod(): privateClass { 
                return null;
            }
            private static get myPrivateStaticMethod(): privateClass {
                return null;
            }
            get myPublicMethod(): privateClass { 
                return null;
            }
            private get myPrivateMethod(): privateClass {
                return null;
            }
            static get myPublicStaticMethod1() { 
                return new privateClass();
            }
            private static get myPrivateStaticMethod1() {
                return new privateClass();
            }
            get myPublicMethod1() { 
                return new privateClass();
            }
            private get myPrivateMethod1() {
                return new privateClass();
            }
        }
    
        export class publicClassWithWithPublicGetAccessorTypes {
            static get myPublicStaticMethod(): publicClass {
                return null;
            }
            private static get myPrivateStaticMethod(): publicClass {
                return null;
            }
            get myPublicMethod(): publicClass {
                return null;
            }
            private get myPrivateMethod(): publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new publicClass();
            }
            private static get myPrivateStaticMethod1() {
                return new publicClass();
            }
            get myPublicMethod1() {
                return new publicClass();
            }
            private get myPrivateMethod1() {
                return new publicClass();
            }
        }
    
        class privateClassWithWithPrivateGetAccessorTypes {
            static get myPublicStaticMethod(): privateClass {
                return null;
            }
            private static get myPrivateStaticMethod(): privateClass {
                return null;
            }
            get myPublicMethod(): privateClass {
                return null;
            }
            private get myPrivateMethod(): privateClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new privateClass();
            }
            private static get myPrivateStaticMethod1() {
                return new privateClass();
            }
            get myPublicMethod1() {
                return new privateClass();
            }
            private get myPrivateMethod1() {
                return new privateClass();
            }
        }
    
        class privateClassWithWithPublicGetAccessorTypes {
            static get myPublicStaticMethod(): publicClass {
                return null;
            }
            private static get myPrivateStaticMethod(): publicClass {
                return null;
            }
            get myPublicMethod(): publicClass {
                return null;
            }
            private get myPrivateMethod(): publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new publicClass();
            }
            private static get myPrivateStaticMethod1() {
                return new publicClass();
            }
            get myPublicMethod1() {
                return new publicClass();
            }
            private get myPrivateMethod1() {
                return new publicClass();
            }
        }
    
        export class publicClassWithWithPrivateSetAccessorTypes {
            static set myPublicStaticMethod(param: privateClass) { 
            }
            private static set myPrivateStaticMethod(param: privateClass) {
            }
            set myPublicMethod(param: privateClass) { 
            }
            private set myPrivateMethod(param: privateClass) {
            }
        }
    
        export class publicClassWithWithPublicSetAccessorTypes {
            static set myPublicStaticMethod(param: publicClass) {
            }
            private static set myPrivateStaticMethod(param: publicClass) {
            }
            set myPublicMethod(param: publicClass) {
            }
            private set myPrivateMethod(param: publicClass) {
            }
        }
    
        class privateClassWithWithPrivateSetAccessorTypes {
            static set myPublicStaticMethod(param: privateClass) {
            }
            private static set myPrivateStaticMethod(param: privateClass) {
            }
            set myPublicMethod(param: privateClass) {
            }
            private set myPrivateMethod(param: privateClass) {
            }
        }
    
        class privateClassWithWithPublicSetAccessorTypes {
            static set myPublicStaticMethod(param: publicClass) {
            }
            private static set myPrivateStaticMethod(param: publicClass) {
            }
            set myPublicMethod(param: publicClass) {
            }
            private set myPrivateMethod(param: publicClass) {
            }
        }
    
        export class publicClassWithPrivateModuleGetAccessorTypes {
            static get myPublicStaticMethod(): privateModule.publicClass { 
                return null;
            }
            get myPublicMethod(): privateModule.publicClass { 
                return null;
            }
            static get myPublicStaticMethod1() { 
                return new privateModule.publicClass();
            }
            get myPublicMethod1() { 
                return new privateModule.publicClass();
            }
        }
    
        export class publicClassWithPrivateModuleSetAccessorTypes {
            static set myPublicStaticMethod(param: privateModule.publicClass) { 
            }
            set myPublicMethod(param: privateModule.publicClass) { 
            }
        }
    
        class privateClassWithPrivateModuleGetAccessorTypes {
            static get myPublicStaticMethod(): privateModule.publicClass {
                return null;
            }
            get myPublicMethod(): privateModule.publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new privateModule.publicClass();
            }
            get myPublicMethod1() {
                return new privateModule.publicClass();
            }
        }
    
        class privateClassWithPrivateModuleSetAccessorTypes {
            static set myPublicStaticMethod(param: privateModule.publicClass) {
            }
            set myPublicMethod(param: privateModule.publicClass) {
            }
        }
    }
    
==== tests/cases/compiler/privacyAccessorDeclFile_GlobalFile.ts (12 errors) ====
    class publicClassInGlobal {
    }
    
    class publicClassInGlobalWithPublicGetAccessorTypes {
        static get myPublicStaticMethod(): publicClassInGlobal {
            return null;
        }
        private static get myPrivateStaticMethod(): publicClassInGlobal {
            return null;
        }
        get myPublicMethod(): publicClassInGlobal {
            return null;
        }
        private get myPrivateMethod(): publicClassInGlobal {
            return null;
        }
        static get myPublicStaticMethod1() {
            return new publicClassInGlobal();
        }
        private static get myPrivateStaticMethod1() {
            return new publicClassInGlobal();
        }
        get myPublicMethod1() {
            return new publicClassInGlobal();
        }
        private get myPrivateMethod1() {
            return new publicClassInGlobal();
        }
    }
    
    class publicClassInGlobalWithWithPublicSetAccessorTypes {
        static set myPublicStaticMethod(param: publicClassInGlobal) {
        }
        private static set myPrivateStaticMethod(param: publicClassInGlobal) {
        }
        set myPublicMethod(param: publicClassInGlobal) {
        }
        private set myPrivateMethod(param: publicClassInGlobal) {
        }
    }
    
    module publicModuleInGlobal {
        class privateClass {
        }
    
        export class publicClass {
        }
    
        module privateModule {
            class privateClass {
            }
    
            export class publicClass {
            }
            export class publicClassWithWithPrivateGetAccessorTypes {
                static get myPublicStaticMethod(): privateClass {
                    return null;
                }
                private static get myPrivateStaticMethod(): privateClass {
                    return null;
                }
                get myPublicMethod(): privateClass {
                    return null;
                }
                private get myPrivateMethod(): privateClass {
                    return null;
                }
                static get myPublicStaticMethod1() {
                    return new privateClass();
                }
                private static get myPrivateStaticMethod1() {
                    return new privateClass();
                }
                get myPublicMethod1() {
                    return new privateClass();
                }
                private get myPrivateMethod1() {
                    return new privateClass();
                }
            }
    
            export class publicClassWithWithPublicGetAccessorTypes {
                static get myPublicStaticMethod(): publicClass {
                    return null;
                }
                private static get myPrivateStaticMethod(): publicClass {
                    return null;
                }
                get myPublicMethod(): publicClass {
                    return null;
                }
                private get myPrivateMethod(): publicClass {
                    return null;
                }
                static get myPublicStaticMethod1() {
                    return new publicClass();
                }
                private static get myPrivateStaticMethod1() {
                    return new publicClass();
                }
                get myPublicMethod1() {
                    return new publicClass();
                }
                private get myPrivateMethod1() {
                    return new publicClass();
                }
            }
    
            class privateClassWithWithPrivateGetAccessorTypes {
                static get myPublicStaticMethod(): privateClass {
                    return null;
                }
                private static get myPrivateStaticMethod(): privateClass {
                    return null;
                }
                get myPublicMethod(): privateClass {
                    return null;
                }
                private get myPrivateMethod(): privateClass {
                    return null;
                }
                static get myPublicStaticMethod1() {
                    return new privateClass();
                }
                private static get myPrivateStaticMethod1() {
                    return new privateClass();
                }
                get myPublicMethod1() {
                    return new privateClass();
                }
                private get myPrivateMethod1() {
                    return new privateClass();
                }
            }
    
            class privateClassWithWithPublicGetAccessorTypes {
                static get myPublicStaticMethod(): publicClass {
                    return null;
                }
                private static get myPrivateStaticMethod(): publicClass {
                    return null;
                }
                get myPublicMethod(): publicClass {
                    return null;
                }
                private get myPrivateMethod(): publicClass {
                    return null;
                }
                static get myPublicStaticMethod1() {
                    return new publicClass();
                }
                private static get myPrivateStaticMethod1() {
                    return new publicClass();
                }
                get myPublicMethod1() {
                    return new publicClass();
                }
                private get myPrivateMethod1() {
                    return new publicClass();
                }
            }
    
            export class publicClassWithWithPrivateSetAccessorTypes {
                static set myPublicStaticMethod(param: privateClass) {
                }
                private static set myPrivateStaticMethod(param: privateClass) {
                }
                set myPublicMethod(param: privateClass) {
                }
                private set myPrivateMethod(param: privateClass) {
                }
            }
    
            export class publicClassWithWithPublicSetAccessorTypes {
                static set myPublicStaticMethod(param: publicClass) {
                }
                private static set myPrivateStaticMethod(param: publicClass) {
                }
                set myPublicMethod(param: publicClass) {
                }
                private set myPrivateMethod(param: publicClass) {
                }
            }
    
            class privateClassWithWithPrivateSetAccessorTypes {
                static set myPublicStaticMethod(param: privateClass) {
                }
                private static set myPrivateStaticMethod(param: privateClass) {
                }
                set myPublicMethod(param: privateClass) {
                }
                private set myPrivateMethod(param: privateClass) {
                }
            }
    
            class privateClassWithWithPublicSetAccessorTypes {
                static set myPublicStaticMethod(param: publicClass) {
                }
                private static set myPrivateStaticMethod(param: publicClass) {
                }
                set myPublicMethod(param: publicClass) {
                }
                private set myPrivateMethod(param: publicClass) {
                }
            }
    
            export class publicClassWithPrivateModuleGetAccessorTypes {
                static get myPublicStaticMethod(): privateModule.publicClass {
                    return null;
                }
                get myPublicMethod(): privateModule.publicClass {
                    return null;
                }
                static get myPublicStaticMethod1() {
                    return new privateModule.publicClass();
                }
                get myPublicMethod1() {
                    return new privateModule.publicClass();
                }
            }
    
            export class publicClassWithPrivateModuleSetAccessorTypes {
                static set myPublicStaticMethod(param: privateModule.publicClass) {
                }
                set myPublicMethod(param: privateModule.publicClass) {
                }
            }
    
            class privateClassWithPrivateModuleGetAccessorTypes {
                static get myPublicStaticMethod(): privateModule.publicClass {
                    return null;
                }
                get myPublicMethod(): privateModule.publicClass {
                    return null;
                }
                static get myPublicStaticMethod1() {
                    return new privateModule.publicClass();
                }
                get myPublicMethod1() {
                    return new privateModule.publicClass();
                }
            }
    
            class privateClassWithPrivateModuleSetAccessorTypes {
                static set myPublicStaticMethod(param: privateModule.publicClass) {
                }
                set myPublicMethod(param: privateModule.publicClass) {
                }
            }
        }
    
        export class publicClassWithWithPrivateGetAccessorTypes {
            static get myPublicStaticMethod(): privateClass { // Error
                                               ~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
                return null;
            }
            private static get myPrivateStaticMethod(): privateClass {
                return null;
            }
            get myPublicMethod(): privateClass { // Error
                                  ~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
                return null;
            }
            private get myPrivateMethod(): privateClass {
                return null;
            }
            static get myPublicStaticMethod1() { // Error
                       ~~~~~~~~~~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateClass'.
                return new privateClass();
            }
            private static get myPrivateStaticMethod1() {
                return new privateClass();
            }
            get myPublicMethod1() { // Error
                ~~~~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateClass'.
                return new privateClass();
            }
            private get myPrivateMethod1() {
                return new privateClass();
            }
        }
    
        export class publicClassWithWithPublicGetAccessorTypes {
            static get myPublicStaticMethod(): publicClass {
                return null;
            }
            private static get myPrivateStaticMethod(): publicClass {
                return null;
            }
            get myPublicMethod(): publicClass {
                return null;
            }
            private get myPrivateMethod(): publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new publicClass();
            }
            private static get myPrivateStaticMethod1() {
                return new publicClass();
            }
            get myPublicMethod1() {
                return new publicClass();
            }
            private get myPrivateMethod1() {
                return new publicClass();
            }
        }
    
        class privateClassWithWithPrivateGetAccessorTypes {
            static get myPublicStaticMethod(): privateClass {
                return null;
            }
            private static get myPrivateStaticMethod(): privateClass {
                return null;
            }
            get myPublicMethod(): privateClass {
                return null;
            }
            private get myPrivateMethod(): privateClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new privateClass();
            }
            private static get myPrivateStaticMethod1() {
                return new privateClass();
            }
            get myPublicMethod1() {
                return new privateClass();
            }
            private get myPrivateMethod1() {
                return new privateClass();
            }
        }
    
        class privateClassWithWithPublicGetAccessorTypes {
            static get myPublicStaticMethod(): publicClass {
                return null;
            }
            private static get myPrivateStaticMethod(): publicClass {
                return null;
            }
            get myPublicMethod(): publicClass {
                return null;
            }
            private get myPrivateMethod(): publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new publicClass();
            }
            private static get myPrivateStaticMethod1() {
                return new publicClass();
            }
            get myPublicMethod1() {
                return new publicClass();
            }
            private get myPrivateMethod1() {
                return new publicClass();
            }
        }
    
        export class publicClassWithWithPrivateSetAccessorTypes {
            static set myPublicStaticMethod(param: privateClass) { // Error
                                                   ~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateClass'.
            }
            private static set myPrivateStaticMethod(param: privateClass) {
            }
            set myPublicMethod(param: privateClass) { // Error
                                      ~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateClass'.
            }
            private set myPrivateMethod(param: privateClass) {
            }
        }
    
        export class publicClassWithWithPublicSetAccessorTypes {
            static set myPublicStaticMethod(param: publicClass) {
            }
            private static set myPrivateStaticMethod(param: publicClass) {
            }
            set myPublicMethod(param: publicClass) {
            }
            private set myPrivateMethod(param: publicClass) {
            }
        }
    
        class privateClassWithWithPrivateSetAccessorTypes {
            static set myPublicStaticMethod(param: privateClass) {
            }
            private static set myPrivateStaticMethod(param: privateClass) {
            }
            set myPublicMethod(param: privateClass) {
            }
            private set myPrivateMethod(param: privateClass) {
            }
        }
    
        class privateClassWithWithPublicSetAccessorTypes {
            static set myPublicStaticMethod(param: publicClass) {
            }
            private static set myPrivateStaticMethod(param: publicClass) {
            }
            set myPublicMethod(param: publicClass) {
            }
            private set myPrivateMethod(param: publicClass) {
            }
        }
    
        export class publicClassWithPrivateModuleGetAccessorTypes {
            static get myPublicStaticMethod(): privateModule.publicClass { // Error
                                               ~~~~~~~~~~~~~
!!! error TS4040: Return type of public static property getter from exported class has or is using private name 'privateModule'.
                return null;
            }
            get myPublicMethod(): privateModule.publicClass { // Error
                                  ~~~~~~~~~~~~~
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'privateModule'.
                return null;
            }
            static get myPublicStaticMethod1() { // Error
                       ~~~~~~~~~~~~~~~~~~~~~
!!! error TS4039: Return type of public static property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
                return new privateModule.publicClass();
            }
            get myPublicMethod1() { // Error
                ~~~~~~~~~~~~~~~
!!! error TS4042: Return type of public property getter from exported class has or is using name 'privateModule.publicClass' from private module 'privateModule'.
                return new privateModule.publicClass();
            }
        }
    
        export class publicClassWithPrivateModuleSetAccessorTypes {
            static set myPublicStaticMethod(param: privateModule.publicClass) { // Error
                                                   ~~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicStaticMethod' of public property setter from exported class has or is using private name 'privateModule'.
            }
            set myPublicMethod(param: privateModule.publicClass) { // Error
                                      ~~~~~~~~~~~~~
!!! error TS4037: Parameter 'myPublicMethod' of public property setter from exported class has or is using private name 'privateModule'.
            }
        }
    
        class privateClassWithPrivateModuleGetAccessorTypes {
            static get myPublicStaticMethod(): privateModule.publicClass {
                return null;
            }
            get myPublicMethod(): privateModule.publicClass {
                return null;
            }
            static get myPublicStaticMethod1() {
                return new privateModule.publicClass();
            }
            get myPublicMethod1() {
                return new privateModule.publicClass();
            }
        }
    
        class privateClassWithPrivateModuleSetAccessorTypes {
            static set myPublicStaticMethod(param: privateModule.publicClass) {
            }
            set myPublicMethod(param: privateModule.publicClass) {
            }
        }
    }