mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 00:35:26 +00:00
Fix segfault caused by ensuring valueless statics are not evaluated (#21577)
(cherry picked from commit c06623bf8c)
This commit is contained in:
@@ -201,7 +201,7 @@ proc hasValuelessStatics(n: PNode): bool =
|
||||
proc doThing(_: MyThing)
|
||||
]#
|
||||
if n.safeLen == 0:
|
||||
n.typ.kind == tyStatic
|
||||
n.typ == nil or n.typ.kind == tyStatic
|
||||
else:
|
||||
for x in n:
|
||||
if hasValuelessStatics(x):
|
||||
|
||||
Reference in New Issue
Block a user