Open
Conversation
5d16c48 to
d86634a
Compare
Contributor
Author
|
I think I have missed a case, I'll fix that when I have time. Sorry about that. |
Contributor
Author
|
Just fixed that, now no more inline assist is published for plain attrset. |
This forbids the case of `f: let x = f x; in x' where removing the binding would make the rewrite semantically incorrect. assists/inline: make check ast lookup is recursive
695ae15 to
fc55bdd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I noticed multiple mugs in my previous PR, sorry about that.
This PR does multiple checks to make sure no incorrect assists are generated, namely:
fromexpressionsInherit usages are now rewritten with the inherit node removed, and with an extra binding added.
I also fixed a part where I traverse the AST too loosely (
.ancestors()) and would overshoot, publishing incorrect assists.Do let me know if there are cases that I haven't covered! Inlining expressions are way more tricky than I thought it was.
Thank you for your time!