tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(4,5): error TS1044: 'public' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(6,5): error TS1044: 'public' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(12,5): error TS1044: 'public' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(13,5): error TS1044: 'public' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(15,5): error TS1044: 'public' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(19,5): error TS1044: 'public' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(25,5): error TS1044: 'public' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(29,5): error TS1044: 'private' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(31,5): error TS1044: 'private' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(37,5): error TS1044: 'private' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(38,5): error TS1044: 'private' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(40,5): error TS1044: 'private' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(44,5): error TS1044: 'private' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(50,5): error TS1044: 'private' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(55,5): error TS1044: 'static' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(57,5): error TS1044: 'static' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(63,5): error TS1044: 'static' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(64,5): error TS1044: 'static' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(66,5): error TS1044: 'static' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(70,5): error TS1044: 'static' modifier cannot appear on a module element. tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(76,5): error TS1044: 'static' modifier cannot appear on a module element. ==== tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts (21 errors) ==== // All of these should be an error module Y { public class A { s: string } ~~~~~~ !!! error TS1044: 'public' modifier cannot appear on a module element. public class BB extends A { ~~~~~~ !!! error TS1044: 'public' modifier cannot appear on a module element. id: number; } } module Y2 { public class AA { s: T } ~~~~~~ !!! error TS1044: 'public' modifier cannot appear on a module element. public interface I { id: number } ~~~~~~ !!! error TS1044: 'public' modifier cannot appear on a module element. public class B extends AA implements I { id: number } ~~~~~~ !!! error TS1044: 'public' modifier cannot appear on a module element. } module Y3 { public module Module { ~~~~~~ !!! error TS1044: 'public' modifier cannot appear on a module element. class A { s: string } } } module Y4 { public enum Color { Blue, Red } ~~~~~~ !!! error TS1044: 'public' modifier cannot appear on a module element. } module YY { private class A { s: string } ~~~~~~~ !!! error TS1044: 'private' modifier cannot appear on a module element. private class BB extends A { ~~~~~~~ !!! error TS1044: 'private' modifier cannot appear on a module element. id: number; } } module YY2 { private class AA { s: T } ~~~~~~~ !!! error TS1044: 'private' modifier cannot appear on a module element. private interface I { id: number } ~~~~~~~ !!! error TS1044: 'private' modifier cannot appear on a module element. private class B extends AA implements I { id: number } ~~~~~~~ !!! error TS1044: 'private' modifier cannot appear on a module element. } module YY3 { private module Module { ~~~~~~~ !!! error TS1044: 'private' modifier cannot appear on a module element. class A { s: string } } } module YY4 { private enum Color { Blue, Red } ~~~~~~~ !!! error TS1044: 'private' modifier cannot appear on a module element. } module YYY { static class A { s: string } ~~~~~~ !!! error TS1044: 'static' modifier cannot appear on a module element. static class BB extends A { ~~~~~~ !!! error TS1044: 'static' modifier cannot appear on a module element. id: number; } } module YYY2 { static class AA { s: T } ~~~~~~ !!! error TS1044: 'static' modifier cannot appear on a module element. static interface I { id: number } ~~~~~~ !!! error TS1044: 'static' modifier cannot appear on a module element. static class B extends AA implements I { id: number } ~~~~~~ !!! error TS1044: 'static' modifier cannot appear on a module element. } module YYY3 { static module Module { ~~~~~~ !!! error TS1044: 'static' modifier cannot appear on a module element. class A { s: string } } } module YYY4 { static enum Color { Blue, Red } ~~~~~~ !!! error TS1044: 'static' modifier cannot appear on a module element. }