Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Fix non-working hoisting #17

Closed
wants to merge 1 commit into from
Closed

Fix non-working hoisting #17

wants to merge 1 commit into from

Conversation

kapouer
Copy link

@kapouer kapouer commented Feb 22, 2020

The current code used to work until i tried to compile it using swc.
Then i reread the specs, and noticed that

function toto() {console.log(test); var test = 2;}
toto()
> undefined

@kapouer
Copy link
Author

kapouer commented Feb 23, 2020

Hmmm i see, it's on purpose. EXTENDS is not initialized by hoisting but it doesn't throw since it is declared by hoisting.

@kapouer kapouer closed this Feb 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant