From 4ca3b74621c3608de42a91730a71892d9d7c27b5 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 1 Aug 2019 20:36:51 +0200 Subject: Remove nullable... it's bad to have magic. Static analysis can do it instead --- src/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler.c') diff --git a/src/compiler.c b/src/compiler.c index 524b555..8c3266c 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -34,7 +34,7 @@ static CHECK_RESULT int create_default_type(amal_compiler *compiler, const char return_if_error(arena_allocator_alloc(&compiler->allocator, sizeof(LhsExpr), (void**)lhs_expr)); lhsexpr_init(*lhs_expr, bool_true, bool_true, bool_true, create_buffer_view(name, strnlen(name, PATH_MAX))); - return_if_error(ast_create(&compiler->allocator, struct_decl, AST_STRUCT_DECL, &nullable_raw((*lhs_expr)->rhs_expr))); + return_if_error(ast_create(&compiler->allocator, struct_decl, AST_STRUCT_DECL, &(*lhs_expr)->rhs_expr)); return_if_error(ast_create(&compiler->allocator, *lhs_expr, AST_LHS, &expr)); expr->resolve_data.type = *lhs_expr; expr->resolve_data.status = AST_RESOLVED; -- cgit v1.2.3