From 9808923258cc8055e2041b15896c97da08531393 Mon Sep 17 00:00:00 2001 From: lyken Date: Thu, 27 Jun 2024 14:46:48 +0800 Subject: [PATCH] core: improve comments in type_inferencer/mod.rs --- nac3core/src/typecheck/type_inferencer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nac3core/src/typecheck/type_inferencer/mod.rs b/nac3core/src/typecheck/type_inferencer/mod.rs index 6c24400c3..af2fd8dec 100644 --- a/nac3core/src/typecheck/type_inferencer/mod.rs +++ b/nac3core/src/typecheck/type_inferencer/mod.rs @@ -880,7 +880,7 @@ impl<'a> Inferencer<'a> { // Check `shape_ty` to see if its a list of int32s, a tuple of int32s, or just int32. // Otherwise throw an error as that would mean the user wrote an ill-typed `shape_expr`. // - // Here, we also take the opportunity to deduce `ndims` statically for 2. and 3. + // Here, we also take the opportunity to deduce `ndims` statically. let shape_ty_enum = &*self.unifier.get_ty(shape_ty); let ndims = match shape_ty_enum { TypeEnum::TList { ty } => { @@ -1292,7 +1292,7 @@ impl<'a> Inferencer<'a> { { let shape_expr = args.remove(0); let (ndims, shape) = - self.fold_numpy_function_call_shape_argument(*id, 0, shape_expr)?; // Special handling the `shape` + self.fold_numpy_function_call_shape_argument(*id, 0, shape_expr)?; // Special handling for `shape` let ndims = self.unifier.get_fresh_literal(vec![SymbolValue::U64(ndims)], None); let ret = make_ndarray_ty(