frontend: align source grammar and reject empty enum payload lists
This commit is contained in:
1 parent
48b9b42fed
commit
4c9c5626c9
44 files changed
+501
-33
No files matched your search
@@ -0,0 +1,8 @@
|
||||
// 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; }
|
||||
Reference in new issue
Block a user