From aad4fafcbab2cd79d5f0293592e3c4a2c9bdc2c0 Mon Sep 17 00:00:00 2001 From: lyken Date: Fri, 23 Aug 2024 16:24:18 +0800 Subject: [PATCH] fixup! core: refactor to use ListObject / List fix gen_expr list index slice bug --- nac3core/src/codegen/expr.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs index fcee8d24..202935b1 100644 --- a/nac3core/src/codegen/expr.rs +++ b/nac3core/src/codegen/expr.rs @@ -2935,7 +2935,8 @@ pub fn gen_expr<'ctx, G: CodeGenerator>( expr.location, ); - let item = list.instance.get_index(generator, ctx, index); + let list_items = list.instance.get(generator, ctx, |f| f.items); + let item = list_items.get_index(generator, ctx, index); item.value.into() } }