diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 11:05:54 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 11:05:54 +0000 |
| commit | b40fc44f799b4810981d37d9030ca69d768cc0b2 (patch) | |
| tree | 131c132f836a1c9845211f4fa01165b09bc08d10 | |
| parent | d97c1c14b7f62fffc1ce54d4ff3354a5ee21743f (diff) | |
Related to #135
| -rw-r--r-- | src/parser/parser_expr.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |
