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 two examples should produce the same output:
rascal>[ v | [_*,/v,_*] := [[1,2], [3,4]]] list[int]: [1,2,3]
rascal>[ v | [_*, x,_*] := [[1,2], [3,4]], /v := x]; list[value]: [ 1, 2, [1,2], 3, 4, [3,4] ]
It seems that backtracking is not implemented correctly for deep list matching in the former case.
Deep set pattern matching does not exhibit the same problem:
rascal>{ v | {_*,/v,_*} := {{1,2}, {3,4}}} set[value]: {1,2,4,{3,4},{1,2},3}
rascal>{ v | {_*, x,_*} := {{1,2}, {3,4}}, /v := x} set[value]: {1,2,4,{3,4},{1,2},3}
I propose to also add regression tests for these different ways of deep pattern matching.
The text was updated successfully, but these errors were encountered:
Workaround that fixes issue #552.
5aaccd2
See also #565 for information about the underlying cause.
Happy to report that the compiled version of the above pattern match does generate the correct answer.
Sorry, something went wrong.
This goes wrong with more nested patterns which are not variables, also normal nodes apparently...
PaulKlint
No branches or pull requests
The following two examples should produce the same output:
It seems that backtracking is not implemented correctly for deep list matching in the former case.
Deep set pattern matching does not exhibit the same problem:
I propose to also add regression tests for these different ways of deep pattern matching.
The text was updated successfully, but these errors were encountered: