We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following Tengo script panics at run time:
a := a.foo
This likely because the compiler wrongly considers a to be defined after the := . A should only be considered defined in the next statement.
The text was updated successfully, but these errors were encountered:
Right, this is a problem, but I'm not sure your solution would work. It would break recursive functions.
Sorry, something went wrong.
For a func block, an exception can be made to the rule I propose that the variable is defined inside there.
Edit: Or, the semantics could stay the same as now, but then a.foo should return undefined in stead of panicking.
Thanks for the fix!
Successfully merging a pull request may close this issue.
The following Tengo script panics at run time:
a := a.foo
This likely because the compiler wrongly considers a to be defined after the := . A should only be considered defined in the next statement.
The text was updated successfully, but these errors were encountered: