From 3292aed0997af0106a5e7520666d72cdda40e0aa Mon Sep 17 00:00:00 2001 From: David Mak Date: Wed, 6 Mar 2024 20:17:40 +0800 Subject: [PATCH] core: Fix ndarray subscript operator returning the wrong object Should be returning the newly created object instead of the original ndarray... --- nac3core/src/codegen/expr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs index 7bc16ee..546a82f 100644 --- a/nac3core/src/codegen/expr.rs +++ b/nac3core/src/codegen/expr.rs @@ -1342,7 +1342,7 @@ fn gen_ndarray_subscript_expr<'ctx, G: CodeGenerator>( llvm_i1.const_zero(), ); - Ok(Some(v.get_ptr().into())) + Ok(Some(ndarray.get_ptr().into())) } }