mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
This solution should resolve the nimsuggest crash issue. However,
perhaps the problem is in the parser?
fix #23518
(cherry picked from commit 60af04635f)
This commit is contained in:
@@ -512,8 +512,9 @@ proc isOpImpl(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||
result.typ = n.typ
|
||||
|
||||
proc semIs(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||
if n.len != 3:
|
||||
if n.len != 3 or n[2].kind == nkEmpty:
|
||||
localError(c.config, n.info, "'is' operator takes 2 arguments")
|
||||
return errorNode(c, n)
|
||||
|
||||
let boolType = getSysType(c.graph, n.info, tyBool)
|
||||
result = n
|
||||
|
||||
Reference in New Issue
Block a user