diff options
author | Jason Beetham <beefers331@gmail.com> | 2023-03-28 20:50:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 04:50:56 +0200 |
commit | c06623bf8ccfccf4788e9f4d2f044ab1bde6fe46 (patch) | |
tree | 0eb580c1eab290ee2e26166910a3ca94a4bf201d /compiler | |
parent | 2315b01ae691e5e9e54fdfdfb4642c8fbc559e48 (diff) | |
download | Nim-c06623bf8ccfccf4788e9f4d2f044ab1bde6fe46.tar.gz |
Fix segfault caused by ensuring valueless statics are not evaluated (#21577)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semtypinst.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 0ef1d0898..2fe8c55e4 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -204,7 +204,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): |