forked from M-Labs/nac3
1
0
Fork 0

fixup! core: refactor to use ListObject / List

fix gen_expr list index slice bug
This commit is contained in:
lyken 2024-08-23 16:24:18 +08:00
parent 9e005e9b07
commit aad4fafcba
No known key found for this signature in database
GPG Key ID: 3BD5FC6AC8325DD8
1 changed files with 2 additions and 1 deletions

View File

@ -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()
}
}