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

Adding new node to collapsed function breaks semantics #9963

Closed
vitvakatu opened this issue May 15, 2024 · 0 comments · Fixed by #10009
Closed

Adding new node to collapsed function breaks semantics #9963

vitvakatu opened this issue May 15, 2024 · 0 comments · Fixed by #10009
Assignees
Labels
--bug Type: bug -gui p-medium Should be completed in the next few sprints
Milestone

Comments

@vitvakatu
Copy link
Contributor

If we have the following function:

func1 =
    text = "1"
    number = text.length
    number

Adding a new node inside this collapsed function produces:

func1 =
    text = "1"
    number = text.length
    number
    number2 =  123

Which is incorrect and changes the return type.

@vitvakatu vitvakatu added --bug Type: bug -gui labels May 15, 2024
@farmaazon farmaazon added this to the Beta Release milestone May 15, 2024
@farmaazon farmaazon added the p-medium Should be completed in the next few sprints label May 16, 2024
@kazcw kazcw self-assigned this May 20, 2024
kazcw added a commit that referenced this issue May 20, 2024
Fixes #9963.

- Fix a bug printing blank lines at the beginning of a module.
- Remove a redundant data-property from `GraphNode`.
@mergify mergify bot closed this as completed in #10009 May 21, 2024
mergify bot pushed a commit that referenced this issue May 21, 2024
Insert new nodes before the block's terminal expression-statement, if present.

Fixes #9963.

# Important Notes
- Fix a bug that caused any empty lines at the beginning of a module not to be printed.
- Remove a redundant data-property from `GraphNode`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--bug Type: bug -gui p-medium Should be completed in the next few sprints
Projects
Status: 🗄️ Archived
Development

Successfully merging a pull request may close this issue.

3 participants