From e8530ca883edd79c188443ced54cea2c5d3ad4ed Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 16 Aug 2016 20:08:40 +0100 Subject: Win32 Demo: OpenGL Context --- src/checker/type.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/checker/type.cpp') diff --git a/src/checker/type.cpp b/src/checker/type.cpp index e0ce88c03..0931774e5 100644 --- a/src/checker/type.cpp +++ b/src/checker/type.cpp @@ -382,6 +382,9 @@ b32 is_type_u8_slice(Type *t) { b32 is_type_vector(Type *t) { return t->kind == Type_Vector; } +b32 is_type_proc(Type *t) { + return t->kind == Type_Proc; +} Type *base_vector_type(Type *t) { if (is_type_vector(t)) { return t->vector.elem; @@ -747,10 +750,12 @@ gbString write_type_to_string(gbString str, Type *type) { if (type->tuple.variable_count > 0) { for (isize i = 0; i < type->tuple.variable_count; i++) { Entity *var = type->tuple.variables[i]; - GB_ASSERT(var->kind == Entity_Variable); - if (i > 0) - str = gb_string_appendc(str, ", "); - str = write_type_to_string(str, var->type); + if (var != NULL) { + GB_ASSERT(var->kind == Entity_Variable); + if (i > 0) + str = gb_string_appendc(str, ", "); + str = write_type_to_string(str, var->type); + } } } break; -- cgit v1.2.3