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

Function slice_element_write

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

Source from the content-addressed store, hash-verified

487 );
488}
489
490#[test]
491fn slice_element_write() {
492 // Writing through a slice element place mutates the backing array. 5 + 20 = 25.
493 assert_exit(
494 r#"
495main: () -> i32 {
496 arr: i32[3] = [10, 20, 30]
497 view: i32[] = arr
498 view[0] = 5
499 return view[0] + arr[1]
500}
501"#,
502 25,
503 );
504}
505

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected