Files
dev c96199e7ec cli: add explicit package source modules
Link manifest-selected source graphs with module-local names, qualified
structs/enums/functions and task workers through ordinary AIR verification.
Keep source inputs bounded, reject source symlinks and preserve explicit
grants, diagnostics and deterministic canonical lowering.

Integrate spec 12/15, RFC 0021, source reference budgets, roadmap, examples
and CI coverage. Validate 579 conformance tests, unit tests, 76 source
constructs, hosted smoke, 36 package CLI checks and task schedule stress.
2026-10-06 18:51:54 +03:00

25 lines
578 B
LLVM

; expect: run
; result: 42
; phase: 0
; spec: docs/spec/15-source-language.md §14.3; docs/spec/07a-air-instructions.md
module app.entry
air 0
lang 0.1
features []
type @Pair = struct { left: u64, right: u64 }
fn @sum(%pair: @Pair) -> u64
effects []
entry:
%left = struct.get @Pair.left, %pair
%right = struct.get @Pair.right, %pair
%total = add.checked.u64 %left, %right
ret %total
fn @main() -> u64
effects []
entry:
%left = const.u64 20
%right = const.u64 22
%pair = struct.make @Pair(%left, %right)
%result = call @sum(%pair)
ret %result