summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-06-24 23:00:19 -0700
committerGitHub <noreply@github.com>2020-06-25 08:00:19 +0200
commit32f335f594d7007fabe4232a63f51137d7fb6cc1 (patch)
tree37b9b6316c6712d3c183fc8afe0ec4f905b05bca /compiler
parent03271593446f72cb99ebe8b68121999ba7ea8021 (diff)
downloadNim-32f335f594d7007fabe4232a63f51137d7fb6cc1.tar.gz
fix #14802 (#14803)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ast.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 40fd40209..b57ee542d 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -1841,7 +1841,8 @@ proc isInfixAs*(n: PNode): bool =
   return n.kind == nkInfix and n[0].kind == nkIdent and n[0].ident.s == "as"
 
 proc findUnresolvedStatic*(n: PNode): PNode =
-  if n.kind == nkSym and n.typ.kind == tyStatic and n.typ.n == nil:
+  # n.typ == nil: see issue #14802
+  if n.kind == nkSym and n.typ != nil and n.typ.kind == tyStatic and n.typ.n == nil:
     return n
 
   for son in n: