antlr4 icon indicating copy to clipboard operation
antlr4 copied to clipboard

[Python] Fix index when combining inserts

Open JamesHutch opened this issue 4 years ago • 3 comments

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.

JamesHutch avatar Jun 10 '21 19:06 JamesHutch

@lygav as original writer of this code, can you check whether this fix is ok ?

ericvergnaud avatar Jun 18 '21 09:06 ericvergnaud

Hi @JamesHutch , can you write a test to demonstrate the issue and verify the solution?

lygav avatar Jun 30 '21 13:06 lygav

I'm going to leave this for after 4.10

parrt avatar Mar 27 '22 18:03 parrt