diff options
| author | gingerBill <bill@gingerbill.org> | 2018-09-09 13:48:33 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-09-09 13:48:33 +0100 |
| commit | 12902821d63973e49f34fe5826f1069ca4ea605b (patch) | |
| tree | de0d95adc10257b85c52c361b00b25f49412cb87 /src/types.cpp | |
| parent | f5549f6bde21c2378700770eae5ab7bba46a3671 (diff) | |
Make diverging procedure types different from ones without a return type
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/types.cpp b/src/types.cpp index 2039dda3b..c4a062421 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -157,7 +157,7 @@ struct TypeUnion { bool are_offsets_set; \ }) \ TYPE_KIND(Proc, struct { \ - Ast *node; \ + Ast *node; \ Scope * scope; \ Type * params; /* Type_Tuple */ \ Type * results; /* Type_Tuple */ \ @@ -174,7 +174,7 @@ struct TypeUnion { bool is_poly_specialized; \ bool has_proc_default_values; \ bool has_named_results; \ - bool no_return; \ + bool diverging; /* no return */ \ isize specialization_count; \ ProcCallingConvention calling_convention; \ }) \ @@ -1405,8 +1405,9 @@ bool are_types_identical(Type *x, Type *y) { case Type_Proc: if (y->kind == Type_Proc) { return x->Proc.calling_convention == y->Proc.calling_convention && - x->Proc.c_vararg == y->Proc.c_vararg && - x->Proc.variadic == y->Proc.variadic && + x->Proc.c_vararg == y->Proc.c_vararg && + x->Proc.variadic == y->Proc.variadic && + x->Proc.diverging == y->Proc.diverging && are_types_identical(x->Proc.params, y->Proc.params) && are_types_identical(x->Proc.results, y->Proc.results); } |