From b40fc44f799b4810981d37d9030ca69d768cc0b2 Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Tue, 27 Jan 2026 11:05:54 +0000 Subject: Related to #135 --- src/parser/parser_expr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/parser') diff --git a/src/parser/parser_expr.c b/src/parser/parser_expr.c index 3a205a8..df2dcf6 100644 --- a/src/parser/parser_expr.c +++ b/src/parser/parser_expr.c @@ -2685,7 +2685,9 @@ ASTNode *parse_primary(ParserContext *ctx, Lexer *l) else { node->resolved_type = xstrdup("unknown"); - if (should_suppress_undef_warning(ctx, acc)) + // If the symbol exists (but type is unknown) OR suppression is requested, don't + // fallback to suggestion + if (sym || should_suppress_undef_warning(ctx, acc)) { node->var_ref.suggestion = NULL; } -- cgit v1.2.3