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

Function restore_depth_drops_let_count

crates/kernel/src/tc.rs:1478–1488  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1476 #[test]
1477 fn lookup_let_val_returns_none_for_lambda_binding() {
1478 let mut tc = new_tc();
1479 tc.push_local(sort0());
1480 assert!(tc.lookup_let_val(0).is_none());
1481 }
1482
1483 #[test]
1484 fn lookup_let_val_returns_some_for_let_binding() {
1485 let mut tc = new_tc();
1486 tc.push_let(sort0(), sort1());
1487 let v = tc.lookup_let_val(0).expect("expected Some for let-bound var");
1488 // Closed value (Sort 1) — lift by 1 is a no-op on closed expressions.
1489 assert!(matches!(v.data(), ExprData::Sort(..)));
1490 }
1491

Callers

nothing calls this directly

Calls 7

new_tcFunction · 0.85
save_depthMethod · 0.80
push_letMethod · 0.80
push_localMethod · 0.80
restore_depthMethod · 0.80
sort0Function · 0.70
sort1Function · 0.70

Tested by

no test coverage detected