antlr4
antlr4 copied to clipboard
[Python] Fix index when combining inserts
prevInserts list is the subset of rewrites, so indices taken from enumerating its elements do not correspond to the correct indices in rewrites. Use prevIop.instructionIndex instead, which matches the other runtimes.
@lygav as original writer of this code, can you check whether this fix is ok ?
Hi @JamesHutch , can you write a test to demonstrate the issue and verify the solution?
I'm going to leave this for after 4.10