MCPcopy Create free account
hub / github.com/argumentcomputer/ix / infer_nat_lit

Function infer_nat_lit

crates/kernel/src/infer.rs:735–744  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

733
734 #[test]
735 fn infer_nat_lit() {
736 let mut env = test_env();
737 let mut tc = TypeChecker::new(&mut env);
738 let n = AE::nat(Nat::from(42u64), mk_addr("42"));
739 let ty = tc.infer(&n).unwrap();
740 // Nat literal type = Nat constant
741 assert!(
742 matches!(ty.data(), ExprData::Const(id, _, _) if id.addr == tc.prims.nat.addr)
743 );
744 }
745
746 #[test]
747 fn infer_cache() {

Callers

nothing calls this directly

Calls 4

inferMethod · 0.80
test_envFunction · 0.70
natFunction · 0.70
mk_addrFunction · 0.70

Tested by

no test coverage detected