9 lines
301 B
Rust
9 lines
301 B
Rust
// expect: run
|
|
// result: 42
|
|
// phase: 6
|
|
// spec: docs/spec/15-source-language.md §2, §5, §6
|
|
module grammar.header_structs
|
|
struct Pair { a: u64, }
|
|
fn test(p: Pair) -> bool effects [] { return p.a == 42u64; }
|
|
fn main() -> u64 effects [] { if test(Pair { a: 42u64 }) { return 42u64; } return 0u64; }
|