TypeScript/tests/baselines/reference/this_inside-enum-should-not-be-allowed.errors.txt

18 lines
841 B
Plaintext
Raw Normal View History

tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts(2,36): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts(7,30): error TS2332: 'this' cannot be referenced in current location.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts (2 errors) ====
enum TopLevelEnum {
ThisWasAllowedButShouldNotBe = this // Should not be allowed
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
2014-07-13 01:04:16 +02:00
}
module ModuleEnum {
enum EnumInModule {
WasADifferentError = this // this was handled as if this was in a module
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
2014-07-13 01:04:16 +02:00
}
}