Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

fix!: class extends is evaluated in the class scope #116

Merged
merged 2 commits into from
Jan 2, 2024
Merged

fix!: class extends is evaluated in the class scope #116

merged 2 commits into from
Jan 2, 2024

Conversation

mdjermanovic
Copy link
Member

Fixes #59

Updates Referencer#visitClass() to visit node.superClass after the class scope is nested, and after the class name variable is defined if it exists.

This means that extends is evaluated in the class scope, as the ECMAScript Specification defines.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@nzakas nzakas merged commit 42ef7a9 into main Jan 2, 2024
13 checks passed
@nzakas nzakas deleted the issue59 branch January 2, 2024 20:11
@github-actions github-actions bot mentioned this pull request Jan 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Is a class's heritage referenced from the wrong scope?
2 participants