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.
10 lines
470 B
Rust
10 lines
470 B
Rust
// expect: reject E7005
|
|
// phase: 6
|
|
// spec: docs/spec/15-source-language.md §18
|
|
module test.static_functions
|
|
fn identity(value: u64) -> u64 effects [] { return value; }
|
|
fn other(value: u64) -> u64 effects [] { return value; }
|
|
struct Policy<T, F: fn(T) -> T effects []> { value: T }
|
|
fn read(value: Policy<u64, fn identity>) -> u64 effects [] { return value.value; }
|
|
fn main() -> u64 effects [] { let value = Policy::<u64, fn other> { value: 42 }; return read(value); }
|