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

Function pointer_member_auto_deref

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

Source from the content-addressed store, hash-verified

85 pts: Point[2] = [Point { .x = 1, .y = 2 }, Point { .x = 3, .y = 4 }]
86 pts[1].x = 36
87 first: Point* = &pts[0]
88 return pts[1].x + first.y
89}
90"#,
91 38,
92 );
93}
94
95// --- Inferred binding syntax (`:=`) ---
96
97#[test]
98fn inferred_bindings_execute() {
99 // `:=` infers primitive, array, and pointer types and runs end to end.
100 assert_exit(
101 r#"
102main: () -> i32 {
103 n := 40
104 arr := [1, 2]
105 p := &arr[1]
106 return n + @p
107}
108"#,

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected