1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(4,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(6,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(12,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(13,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(15,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(19,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(25,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(29,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(31,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(37,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(38,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(40,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(44,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(50,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(55,5): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(57,5): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(63,5): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(64,5): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(66,5): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(70,5): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(76,5): error TS1044: 'static' modifier cannot appear on a module or namespace 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 or namespace element.
public class BB<T> extends A {
~~~~~~
!!! error TS1044: 'public' modifier cannot appear on a module or namespace element.
id: number;
}
}
module Y2 {
public class AA<T> { s: T }
~~~~~~
!!! error TS1044: 'public' modifier cannot appear on a module or namespace element.
public interface I { id: number }
~~~~~~
!!! error TS1044: 'public' modifier cannot appear on a module or namespace element.
public class B extends AA<string> implements I { id: number }
~~~~~~
!!! error TS1044: 'public' modifier cannot appear on a module or namespace element.
}
module Y3 {
public module Module {
~~~~~~
!!! error TS1044: 'public' modifier cannot appear on a module or namespace element.
class A { s: string }
}
}
module Y4 {
public enum Color { Blue, Red }
~~~~~~
!!! error TS1044: 'public' modifier cannot appear on a module or namespace element.
}
module YY {
private class A { s: string }
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
private class BB<T> extends A {
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
id: number;
}
}
module YY2 {
private class AA<T> { s: T }
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
private interface I { id: number }
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
private class B extends AA<string> implements I { id: number }
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
}
module YY3 {
private module Module {
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
class A { s: string }
}
}
module YY4 {
private enum Color { Blue, Red }
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
}
module YYY {
static class A { s: string }
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
static class BB<T> extends A {
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
id: number;
}
}
module YYY2 {
static class AA<T> { s: T }
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
static interface I { id: number }
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
static class B extends AA<string> implements I { id: number }
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
}
module YYY3 {
static module Module {
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
class A { s: string }
}
}
module YYY4 {
static enum Color { Blue, Red }
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
}
|