This commit is contained in:
Nobuyoshi Nakada 2023-11-09 16:29:49 +09:00
Родитель fae44d6524
Коммит e824b69a86
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -719,7 +719,7 @@ pm_lookup_local_index_with_depth(rb_iseq_t *iseq, pm_scope_node_t *scope_node, p
static ID
pm_constant_id_lookup(pm_scope_node_t *scope_node, pm_constant_id_t constant_id)
{
return ((ID *)scope_node->constants)[constant_id - 1];
return scope_node->constants[constant_id - 1];
}
static rb_iseq_t *
@ -3782,7 +3782,7 @@ rb_translate_prism(pm_parser_t *parser, rb_iseq_t *iseq, pm_scope_node_t *scope_
for (size_t i = 0; i < locals->size; i++) {
st_insert(index_lookup_table, locals->ids[i], i);
}
scope_node->constants = (void *)constants;
scope_node->constants = constants;
scope_node->index_lookup_table = index_lookup_table;
pm_compile_node(iseq, (pm_node_t *)scope_node, ret, scope_node->base.location.start, false, (pm_scope_node_t *)scope_node);