Skip to content

fix: account for different scopes during path evaluation#831

Merged
boopathi merged 5 commits intomasterfrom
recalc-scope
May 13, 2018
Merged

fix: account for different scopes during path evaluation#831
boopathi merged 5 commits intomasterfrom
recalc-scope

Conversation

@vigneshshanmugam
Copy link
Copy Markdown
Member

@vigneshshanmugam vigneshshanmugam requested a review from boopathi as a code owner May 3, 2018 13:42
return { shouldDeopt: true };
}

let blockParent = binding.path.scope.getBlockParent().path;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

"if" condition is incorrectly omitted after minify if statement wrongly removed when var declaration inside conditional block

2 participants