harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

commit 23f0fee730c9ddae02ff7fbf449f70d1f56a1192
parent b48e6b3ea5357acac3b5e3aa986515ce827e0908
Author: Bor Grošelj Simić <bgs@turminal.net>
Date:   Sat, 18 Feb 2023 04:21:21 +0100

remove pointless error check

type_store_lookup_atype never returns NULL

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>

Diffstat:
Msrc/check.c | 1-
1 file changed, 0 insertions(+), 1 deletion(-)

diff --git a/src/check.c b/src/check.c @@ -3618,7 +3618,6 @@ resolve_const(struct context *ctx, struct incomplete_declaration *idecl) const struct type *type = NULL; if (decl->type) { type = type_store_lookup_atype(ctx->store, decl->type); - expect(ctx, &decl->type->loc, type != NULL, "Unable to resolve type"); } struct expression *initializer = xcalloc(1, sizeof(struct expression)); check_expression(ctx, decl->init, initializer, type);