slovo/docs/language/examples/speculative/unsafe-memory.slo
2026-05-22 08:38:43 +02:00

14 lines
310 B
Plaintext

; status: design/speculative
; Lexical `unsafe` is promoted; this fixture tracks raw-memory follow-up.
; Pointer locals and raw operations remain outside v0.
(module unsafe_memory)
(fn main () -> i32
(unsafe
(let p (ptr i32) (alloc i32))
(store p 42)
(print_i32 (load p))
(dealloc p))
0)