From 12902821d63973e49f34fe5826f1069ca4ea605b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 9 Sep 2018 13:48:33 +0100 Subject: Make diverging procedure types different from ones without a return type --- src/types.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/types.cpp') 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); } -- cgit v1.2.3