From a91602915aa30409451db7c1ef8070e32c03c593 Mon Sep 17 00:00:00 2001 From: David Mak Date: Tue, 9 Jul 2024 13:31:45 +0800 Subject: [PATCH] core: Fix missing fields in range type --- nac3core/src/toplevel/helper.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nac3core/src/toplevel/helper.rs b/nac3core/src/toplevel/helper.rs index 76d454cff..1d0c291f6 100644 --- a/nac3core/src/toplevel/helper.rs +++ b/nac3core/src/toplevel/helper.rs @@ -361,7 +361,13 @@ impl TopLevelComposer { }); let range = unifier.add_ty(TypeEnum::TObj { obj_id: PrimDef::Range.id(), - fields: HashMap::new(), + fields: [ + ("start".into(), (int32, true)), + ("stop".into(), (int32, true)), + ("step".into(), (int32, true)), + ] + .into_iter() + .collect(), params: VarMap::new(), }); let str = unifier.add_ty(TypeEnum::TObj {