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

User functions may be called even when function definition is disabled #8661

Open
1 task done
RealJohnSmith opened this issue Nov 18, 2024 · 2 comments · May be fixed by #8665
Open
1 task done

User functions may be called even when function definition is disabled #8661

RealJohnSmith opened this issue Nov 18, 2024 · 2 comments · May be fixed by #8665
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@RealJohnSmith
Copy link

RealJohnSmith commented Nov 18, 2024

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

This user program produces an illegal generated code:

Image

While there are mechanisms how to prevent this combination in the workspace, it does not catch all situations.

Catches (good, expected):

  • When function definition is disabled while function call is in the scope, the function call gets disabled automatically as well

Doesn't catch (bug):

  • When a function definition is already disabled, and a new function call is created (e.g. paste action or from a flyout), the function call is kept enabled (observed), however the expected behavior is that it will get disabled.

Environment:
I am using blockly installation from npm:

npm view blockly version 
11.1.1

Stack trace

Not relevant

Screenshots

No response

Browsers

No response

@RealJohnSmith RealJohnSmith added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels Nov 18, 2024
@gonfunko gonfunko removed the issue: triage Issues awaiting triage by a Blockly team member label Nov 18, 2024
@gonfunko
Copy link
Contributor

Thank you for reporting this! I've created a PR to resolve it.

@RealJohnSmith
Copy link
Author

Thank you. When can we expect this in npm release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
2 participants