-
Notifications
You must be signed in to change notification settings - Fork 0
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
Anonymous pairs are not matched because of unavailable variable replacement map #103
Labels
bug
Something isn't working
Comments
mkshiblu
added
In progress
Currently doing
and removed
In progress
Currently doing
labels
Apr 8, 2021
Looks like we can explore observations here.
let x = m1(function a1(){}, function a2() {}); Here if we do round system text without anonymous would be
let x = m1(, function a2()) // a1 pairs removed
let x = m2(function a1(), ) // a2 pairs removed
let x = // all anonymous removed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In body mapper, we try to match anonymous classes appearing in a pair of statements based on the texts without the anonymous classes.
The text without anonymous for the following snippet will be let x = "
However, when we moved the anonymous matching logic at the top of the findReplacementWithExactMapping, to prevent passing it to SED, we do not do any replacements. Therefore the replacements passed to the argument of identicalAfterVariableAndTypeReplacements is empty.
So even though the statements without Anonymus are identical with the replacement of variable x with y, the method does not return true and therefore it does not match the pairs.
The text was updated successfully, but these errors were encountered: