close some gaps in the type system
This commit is contained in:
@@ -77,6 +77,7 @@ Kind :: enum u8 {
|
||||
Struct,
|
||||
Union,
|
||||
Fallible,
|
||||
Sum,
|
||||
Type_Call,
|
||||
}
|
||||
|
||||
@@ -411,6 +412,10 @@ fallible_error :: proc(value: Type, store: ^Store) -> Type {
|
||||
return item.extra if ok && item.kind == .Fallible else INVALID
|
||||
}
|
||||
|
||||
sum_syntax :: proc(store: ^Store, left, right: Type) -> Type {
|
||||
return intern(store, Node{kind=.Sum, child=left, extra=right})
|
||||
}
|
||||
|
||||
append_sum_variants :: proc(store: ^Store, value: Type, out: ^[dynamic]Sum_Variant) -> bool {
|
||||
item, ok := node(store, value)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user