Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Apr 6, 2018

Fixes #23235
The bug was because we were trying to insert a semicolon after a node we were also deleting.
A better fix might be to use replaceNode instead of deleteNode and insertNodeAfter, but that seemed to break a few tests. (It also wouldn't work with a variable declaration in a VariableDeclarationList with multiple entries, but I don't think it's too important to support that use case.)

@ghost ghost requested review from amcasey and mhegazy April 6, 2018 23:14
@ghost ghost force-pushed the convertFunctionToEs6ClassNoSemicolon branch from d9e08ea to 162446f Compare April 6, 2018 23:48
@ghost ghost changed the title Fix bug: don't insert a semicolon when inserting a node after another Fix bug: don't insert a semicolon when inserting a FunctionDeclaration Apr 6, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Apr 9, 2018

Please port to release-2.8 as well.

@ghost ghost merged commit ce5d22f into master Apr 9, 2018
@ghost ghost deleted the convertFunctionToEs6ClassNoSemicolon branch April 9, 2018 22:03
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
This pull request was closed.
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.

getCodeFixes: 'Debug failure Changes overlap' in getTextChangesFromChanges
1 participant