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

fix: always rename caller to legal name #6014

Merged
merged 3 commits into from
Mar 21, 2022

Conversation

BeksOmega
Copy link
Collaborator

@BeksOmega BeksOmega commented Mar 21, 2022

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

#5971

Proposed Changes

Makes it so that when call blocks are created, if their name matches an existing procedure def, but they do not have the args to match that procedure def, a new def is created with a new name, and the callers name is changed to match.

Behavior Before Change

A new procedure would be created, but the caller would not be renamed to match it, so the program would end up in a broken state.

Behavior After Change

The caller is renamed to match the generated definition, so the program is legal.

Reason for Changes

Letting users accidentally make their programs invalid is bad.

Test Coverage

Tested on:

  • Desktop Chrome

Documentation

N/A

Additional Information

Love it when my past self writes tests for my future self :D

@BeksOmega BeksOmega requested a review from a team as a code owner March 21, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants