Files
aji/tests/conformance/source/grammar_surface/enum_binds.aji
T

8 lines
314 B
Rust

// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §2, §5, §6
module grammar.enum_binds
enum Value<T> { Empty, Pair(T, T), }
fn main() -> u64 effects [] { let v = Value::<u64>::Pair(1u64,42u64,); return match v { Value::<u64>::Empty => {0u64}, Value::<u64>::Pair(_, n,) => n }; }