-
Notifications
You must be signed in to change notification settings - Fork 77
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
Environment leak in innermost visit #1719
Comments
rewriting to a |
it seems the bug requires:
|
The code that iterated over a list of alternative matches with the same outermost function symbol did not apply the environment hygiene rules that are normally used for backtracking over alternatives bindings ( |
Many thanks for the thorough investigation! |
thanks for the report @ltbinsbe; it's fixed now, but lacking some tests. |
Describe the bug
This example code by Thomas van Binsbergen shows how a variable binding leaks from one case into the next during an innermost visit:
Example Java code to run this one:
The current output:
This is a serious issue since the previous bindings will prevent succeeding matching because fresh variables
are not used and equality is checked against the previous binding.
The code is now running on the example because we renamed the variables to be unique. The original code used
X
for all open positions that needed to be bound.The text was updated successfully, but these errors were encountered: