Files
aji/tests/conformance/source/static_functions/wrong_borrow.aji
T
dev f02f4bd55b cli: add explicit static function parameters
Bind typed source functions with exact effect contracts during deterministic
specialization; retain nominal operation identity and ordinary AIR verification.

Add spec/RFC/grammar, checked Quick Reference examples, source/AIR conformance,
package/hosted CLI tests, scheduler/GC coverage and documentation budgets.
2026-10-07 10:23:03 +03:00

9 lines
386 B
Rust

// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §18
module test.static_functions
struct Key { id: u64 }
fn selected(key: mut<Key>) -> u64 effects [] { return key.id; }
fn run<F: fn(ref<Key>) -> u64 effects []>(key: ref<Key>) -> u64 effects [] { return F(key); }
fn main() -> u64 effects [] { let key = Key { id: 42 }; return run::<fn selected>(ref key); }