diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-10-03 02:45:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 14:45:04 -0400 |
commit | 642ac0c1c31063ae966d8448c64c539203432e94 (patch) | |
tree | 77f478064fc468b83c77a3b3487d121a674b7bfb /compiler/semexprs.nim | |
parent | 49df69334e8c81354d604bbde05665d6c5450ddb (diff) | |
download | Nim-642ac0c1c31063ae966d8448c64c539203432e94.tar.gz |
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.
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
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 |