[ruby/prism] Set up location correctly for hashed locals

https://github.com/ruby/prism/commit/0334140790
This commit is contained in:
Kevin Newton 2024-04-05 15:14:25 -04:00 committed by git
parent 1953ead74e
commit fbeb8f2c78

View File

@ -905,6 +905,7 @@ pm_locals_write(pm_locals_t *locals, pm_constant_id_t name, const uint8_t *start
if (local->name == PM_CONSTANT_ID_UNSET) {
*local = (pm_local_t) {
.name = name,
.location = { .start = start, .end = end },
.index = locals->size++,
.reads = reads,
.hash = initial_hash