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

Function struct_argument_is_passed_by_value

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

Source from the content-addressed store, hash-verified

1816"#,
1817 42,
1818 );
1819}
1820
1821#[test]
1822fn result_err_arm_executes() {
1823 assert_exit(
1824 r#"
1825parse: (n: i32) -> Result<i32, i32> {
1826 if n < 0 {
1827 return Err(0 - n)
1828 }
1829 return Ok(n)
1830}
1831
1832main: () -> i32 {
1833 r: Result<i32, i32> = parse(0 - 5)
1834 match r {
1835 Ok(v) -> {
1836 return v
1837 }
1838 Err(e) -> {
1839 return e
1840 }

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected