From 642ac0c1c31063ae966d8448c64c539203432e94 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 3 Oct 2023 02:45:04 +0800 Subject: fixes #22753; Nimsuggest segfault with invalid assignment to table (#22781) fixes #22753 ## Future work We should turn all the error nodes into nodes of a nkError kind, which could be a industrious task. But perhaps we can add a special treatment for error nodes to make the transition smooth. --- compiler/semexprs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/semexprs.nim') diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 633a0cc26..8cdd16f02 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1886,7 +1886,7 @@ proc semAsgn(c: PContext, n: PNode; mode=asgnNormal): PNode = result.add(n[1]) if mode == noOverloadedSubscript: bracketNotFoundError(c, result) - return n + return errorNode(c, n) else: result = semExprNoType(c, result) return result -- cgit 1.4.1-2-gfad0