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

Yoko Oh Noes confuse about local v. global function names #734

Open
lgto4 opened this issue May 30, 2020 · 1 comment
Open

Yoko Oh Noes confuse about local v. global function names #734

lgto4 opened this issue May 30, 2020 · 1 comment

Comments

@lgto4
Copy link

lgto4 commented May 30, 2020

Refer to https://www.khanacademy.org/computer-programming/global-v-local-confusion/6708041267363840 . Within a function, another function called "red" is declared. That function cannot be invoked because it does not have the correct number of arguments that correspond to the (global) Processing.js "red" function.

@pamelafox
Copy link
Collaborator

Ah tricky. We'd need to involve the AST in making sure we didn't enforce the args in the case of a local function. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants