Skip to content

Nodes: Class body passthrough expressions get hoisted if anything in a class is hoisted #4724

Closed
@stevefan1999-personal

Description

@stevefan1999-personal

http://tinyurl.com/yb476vtn
Although it was still a legit prototype construct, this is very problematic for backtick embeded JS expression.
http://tinyurl.com/ya7xo5fz
The entire qux = 10 was shifted outside of the class declaration.
I do believe this is a compiler bug.

Workaround:
http://tinyurl.com/y7gzwfup for backtick property-based apply/or
http://tinyurl.com/y8xa58a6 for constructor apply

*PS: backtick property-based apply will still be boil down to constructor apply, tested with babel online repl: http://tinyurl.com/yd94hv4y

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions