Support for bools. Also fix fallible/infallible mixup for ctors.

This commit is contained in:
Chris Fallin
2021-09-09 16:26:35 -07:00
parent a412cce615
commit edc95c51a0
4 changed files with 35 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
(type u32 (primitive u32))
(type bool (primitive bool))
(type A (enum (A1 (x u32))))
(decl Ext1 (u32) A)
@@ -6,6 +7,9 @@
(extern extractor Ext1 ext1)
(extern extractor Ext2 ext2)
(decl C (bool) A)
(extern constructor C c)
(decl Lower (A) A)
(rule
@@ -14,4 +18,4 @@
a
(Ext1 x)
(Ext2 =x)))
a)
(C #t))