Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix variable declaration regression #15979

Merged
merged 1 commit into from
Dec 14, 2017

Conversation

bekzod
Copy link
Contributor

@bekzod bekzod commented Dec 14, 2017

itemsKeyIsAtThis used before its declared

@bekzod
Copy link
Contributor Author

bekzod commented Dec 14, 2017

regressed with #15733

@bekzod bekzod changed the title correct variable declaration fix variable declaration regression Dec 14, 2017
@rwjblue
Copy link
Member

rwjblue commented Dec 14, 2017

As evidenced by the passing tests the way it was does work. I tested locally (without transpilation):

function foo() {
  return bar;
}
let bar = "lol";
foo()

I only share this because I was also surprised that this was the behavior. I would have thought the exact thing you are fixing would cause an error (or not work).

Anyways, the change seems good to me, just thought I’d share...

@rwjblue rwjblue merged commit 37ceda1 into emberjs:master Dec 14, 2017
@bekzod bekzod deleted the correct-variable-declaration branch December 14, 2017 11:47
@bekzod
Copy link
Contributor Author

bekzod commented Dec 14, 2017

super logical javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants