Skip to content
Snippets Groups Projects
Commit 7c5a1d4d authored by Lukas Stadler's avatar Lukas Stadler
Browse files

more resilient test in EvaluatedArgumentsVisitor

parent 115caf7c
Branches
No related tags found
No related merge requests found
......@@ -141,10 +141,14 @@ public final class EvaluatedArgumentsVisitor extends RSyntaxVisitor<Info> {
info.maybeAssignedNames.add(((RSyntaxLookup) arguments[0]).getIdentifier());
} else {
info.addBefore(accept(arguments[0]));
while (!(current instanceof RSyntaxLookup)) {
while (current instanceof RSyntaxCall) {
current = ((RSyntaxCall) current).getSyntaxArguments()[0];
}
info.evaluatedNames.add(((RSyntaxLookup) current).getIdentifier());
if (current instanceof RSyntaxLookup) {
info.evaluatedNames.add(((RSyntaxLookup) current).getIdentifier());
} else {
return Info.ANY;
}
}
info.addBefore(accept(arguments[1]));
return info;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment