2014-09-12 22:35:07 +02:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts (6 errors) ====
|
|
|
|
// All of these should be an error
|
|
|
|
|
|
|
|
module Y {
|
|
|
|
public var x: number = 0;
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1044: 'public' modifier cannot appear on a module element.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module Y2 {
|
|
|
|
public function fn(x: string) { }
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1044: 'public' modifier cannot appear on a module element.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module Y4 {
|
|
|
|
static var x: number = 0;
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1044: 'static' modifier cannot appear on a module element.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module YY {
|
|
|
|
static function fn(x: string) { }
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1044: 'static' modifier cannot appear on a module element.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module YY2 {
|
|
|
|
private var x: number = 0;
|
|
|
|
~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1044: 'private' modifier cannot appear on a module element.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module YY3 {
|
|
|
|
private function fn(x: string) { }
|
|
|
|
~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1044: 'private' modifier cannot appear on a module element.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|