MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / for_over_range_subslice

Function for_over_range_subslice

tests/integration/hll_conformance.rs:606–621  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

604 // A runtime index that is in bounds passes the check and reads the element.
605 assert_exit(
606 r#"
607main: () -> i32 {
608 arr: i32[3] = [10, 20, 30]
609 view: i32[] = arr
610 i: i32 = 2
611 return view[i]
612}
613"#,
614 30,
615 );
616}
617
618// --- Range slicing (arr[a..b]) ---
619
620#[test]
621fn range_slice_from_array() {
622 // arr[1..4] is the half-open sub-slice {20, 30, 40}. 20 + 40 + 3 = 63.
623 assert_exit(
624 r#"

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected