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

Map new nodes in replacement edits to their mutable equivalents in SyntaxEditor #18525

Open
DropDemBits opened this issue Nov 17, 2024 · 1 comment · May be fixed by #18531
Open

Map new nodes in replacement edits to their mutable equivalents in SyntaxEditor #18525

DropDemBits opened this issue Nov 17, 2024 · 1 comment · May be fixed by #18531
Labels
C-bug Category: bug

Comments

@DropDemBits
Copy link
Contributor

SyntaxEditor should handle transform any node in an edit that reference the original syntax tree into their mutable equivalents, but seems like I forgot this case for the new nodes in replace edits 😅. For now it should be okay to use clone_for_update and add a fixme, and then we can remove those fixmes once SyntaxEditor is fixed.

Originally posted by @DropDemBits in #18495 (comment)

@DropDemBits DropDemBits added the C-bug Category: bug label Nov 17, 2024
@Giga-Bowser
Copy link
Contributor

Would this also mean we can remove clone_for_update from methods in syntax::ast::syntax_factory::constructors, or should we only handle making mutable clones for nodes found in the SyntaxEditor's original tree?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
2 participants