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

Function infer_open_cache_is_context_sensitive

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

Source from the content-addressed store, hash-verified

769
770 #[test]
771 fn infer_open_cache_is_context_sensitive() {
772 let mut env = test_env();
773 let mut tc = TypeChecker::new(&mut env);
774 let e = AE::var(0, ());
775
776 tc.push_local(sort0());
777 let t1 = tc.infer(&e).unwrap();
778 let cache_len = tc.env.infer_cache.len();
779 tc.pop_local();
780
781 tc.push_local(sort1());
782 let t2 = tc.infer(&e).unwrap();
783 assert_ne!(t1, t2);
784 assert!(tc.env.infer_cache.len() > cache_len);
785 }
786
787 // =========================================================================
788 // Error paths

Callers

nothing calls this directly

Calls 8

push_localMethod · 0.80
inferMethod · 0.80
pop_localMethod · 0.80
test_envFunction · 0.70
varFunction · 0.70
sort0Function · 0.70
sort1Function · 0.70
lenMethod · 0.45

Tested by

no test coverage detected