48 lines
2 KiB
Plaintext
48 lines
2 KiB
Plaintext
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(4,5): error TS1044: 'public' modifier cannot appear on a module element.
|
|
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(8,5): error TS1044: 'public' modifier cannot appear on a module element.
|
|
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(12,5): error TS1044: 'static' modifier cannot appear on a module element.
|
|
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(16,5): error TS1044: 'static' modifier cannot appear on a module element.
|
|
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(20,5): error TS1044: 'private' modifier cannot appear on a module element.
|
|
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(25,5): error TS1044: 'private' modifier cannot appear on a module element.
|
|
|
|
|
|
==== tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts (6 errors) ====
|
|
// All of these should be an error
|
|
|
|
module Y {
|
|
public var x: number = 0;
|
|
~~~~~~
|
|
!!! error TS1044: 'public' modifier cannot appear on a module element.
|
|
}
|
|
|
|
module Y2 {
|
|
public function fn(x: string) { }
|
|
~~~~~~
|
|
!!! error TS1044: 'public' modifier cannot appear on a module element.
|
|
}
|
|
|
|
module Y4 {
|
|
static var x: number = 0;
|
|
~~~~~~
|
|
!!! error TS1044: 'static' modifier cannot appear on a module element.
|
|
}
|
|
|
|
module YY {
|
|
static function fn(x: string) { }
|
|
~~~~~~
|
|
!!! error TS1044: 'static' modifier cannot appear on a module element.
|
|
}
|
|
|
|
module YY2 {
|
|
private var x: number = 0;
|
|
~~~~~~~
|
|
!!! error TS1044: 'private' modifier cannot appear on a module element.
|
|
}
|
|
|
|
|
|
module YY3 {
|
|
private function fn(x: string) { }
|
|
~~~~~~~
|
|
!!! error TS1044: 'private' modifier cannot appear on a module element.
|
|
}
|
|
|