forked from M-Labs/nac3
1
0
Fork 0

core: Fix missing fields in range type

This commit is contained in:
David Mak 2024-07-09 13:31:45 +08:00
parent 1c56005a01
commit a91602915a
1 changed files with 7 additions and 1 deletions

View File

@ -361,7 +361,13 @@ impl TopLevelComposer {
}); });
let range = unifier.add_ty(TypeEnum::TObj { let range = unifier.add_ty(TypeEnum::TObj {
obj_id: PrimDef::Range.id(), 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(), params: VarMap::new(),
}); });
let str = unifier.add_ty(TypeEnum::TObj { let str = unifier.add_ty(TypeEnum::TObj {