From 6d97ed2344f322f416cde70a4fc9f18e795388b0 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 14 Sep 2008 17:48:29 +0000 Subject: [PATCH] Handle the error type in descend_into_subtype(). [r21947] --- parser.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/parser.c b/parser.c index b3ff091..6d5b166 100644 --- a/parser.c +++ b/parser.c @@ -2148,8 +2148,6 @@ static void descend_into_subtype(type_path_t *path) type_t *orig_top_type = path->top_type; type_t *top_type = skip_typeref(orig_top_type); - assert(is_type_compound(top_type) || is_type_array(top_type)); - type_path_entry_t *top = append_to_type_path(path); top->type = top_type; @@ -2163,11 +2161,11 @@ static void descend_into_subtype(type_path_t *path) } else { path->top_type = NULL; } - } else { - assert(is_type_array(top_type)); - + } else if (is_type_array(top_type)) { top->v.index = 0; path->top_type = top_type->array.element_type; + } else { + assert(!is_type_valid(top_type)); } } -- 2.20.1