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

Recursive call in procedure does not work without repeating procedure signature #30

Open
Telcrome opened this issue Jan 28, 2020 · 2 comments
Labels
bug Something isn't working parser

Comments

@Telcrome
Copy link

procedure f(number i); // This is required
procedure f(number i) {
  f(i + 1);
}
@Telcrome
Copy link
Author

Even with the extra declaration the process exits immediately tho

@vmatare vmatare added the bug Something isn't working label Jan 28, 2020
@vmatare
Copy link
Collaborator

vmatare commented Jan 28, 2020

One problem is that the parser creates a second scope with a second instance of i when the definition is parsed. That scope (along with the i instance that is later referenced) however is discarded in define_global because the existing forward declaration already has a scope...

@vmatare vmatare added the parser label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser
Projects
None yet
Development

No branches or pull requests

2 participants