Skip to content

must visit decorators before enter_node and enter_scope if have decorators field #4142

@Dunqing

Description

@Dunqing

Please see:

fn visit_class(&mut self, class: &Class<'a>) {
// Class level decorators are transpiled as functions outside of the class taking the class
// itself as argument. They should be visited before class is entered. E.g., they inherit
// strict mode from the enclosing scope rather than from class.
for decorator in &class.decorators {

Metadata

Metadata

Assignees

Labels

A-astArea - ASTC-bugCategory - Bug

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions