Missing error if ClassDeclaration is used in Statement position #22682
Labels
Bug
A bug in TypeScript
Effort: Casual
Good issue if you're already used to contributing to the codebase. Harder than "good first issue".
Help Wanted
You can do this
Milestone
TypeScript Version: 2.8.0-dev.20180318
Search Terms: class statement
Code
Expected behavior:
Expected a compile error on
class C
and maybe onenum E
Actual behavior:
no error for these declarations, instead I get a runtime error when targeting ES2015 or above.
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: