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: account for different scopes during path evaluation #831

Merged
merged 5 commits into from May 13, 2018

Conversation

return { shouldDeopt: true };
}

let blockParent = binding.path.scope.getBlockParent().path;
Copy link
Member

Choose a reason for hiding this comment

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

this requires null check too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Block parent cannot be null, it returns Program path.


if (node.kind !== "var") {
return;
}
Copy link
Member

Choose a reason for hiding this comment

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

why is this changed? Let's stick to .isType( params )

Copy link
Member Author

Choose a reason for hiding this comment

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

Checking for isVariableDeclaration inside variableDeclaration feels weird. So changed it.

Also it checks first for type and kind.

Copy link
Member

Choose a reason for hiding this comment

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

isVariableDeclaration has kind ... So let's change it back.

@boopathi boopathi added the Tag: Bug Fix Pull Request fixes a bug label May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tag: Bug Fix Pull Request fixes a bug
Projects
None yet
2 participants