14 lines
No EOL
541 B
Text
14 lines
No EOL
541 B
Text
==== tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts (2 errors) ====
|
|
enum TopLevelEnum {
|
|
ThisWasAllowedButShouldNotBe = this // Should not be allowed
|
|
~~~~
|
|
!!! 'this' cannot be referenced in current location.
|
|
}
|
|
|
|
module ModuleEnum {
|
|
enum EnumInModule {
|
|
WasADifferentError = this // this was handled as if this was in a module
|
|
~~~~
|
|
!!! 'this' cannot be referenced in current location.
|
|
}
|
|
} |