Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jul 14, 2017

We shouldn't modify a node after it has been created. There is one place where we must cast to as MutableNodeArray in es2015.ts; this is on a node that we just created.

@ghost ghost requested a review from weswigham July 14, 2017 22:50
Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Generally seems like it adds safety. I dislike the cast into the mutating function for what amounts to an immutable usage, but I suppose a copy of the function that returns a slice rather than doing an unshift is a bit much.

@ghost ghost merged commit 194c2bc into master Jul 18, 2017
@ghost ghost deleted the readonly_nodearray branch July 18, 2017 17:38
@ghost ghost mentioned this pull request Jul 20, 2017
4 tasks
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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.

2 participants