summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-11-23 02:37:23 +0100
committerAraq <rumpf_a@web.de>2017-11-23 02:37:23 +0100
commitdee5e63f6253d3a8134e0926ff7b32fbf740822e (patch)
tree4b95466e388e00ca973a67cbc53780ff97652cde
parent8a601669ef6bedd6ab9f70bd09936d24a6a10ade (diff)
downloadNim-dee5e63f6253d3a8134e0926ff7b32fbf740822e.tar.gz
fixes #4686
-rw-r--r--compiler/semtypes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 52d992a66..35abbc21d 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -1360,7 +1360,7 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
         case n.len
         of 3:
           result = semTypeNode(c, n.sons[1], prev)
-          if result.skipTypes({tyGenericInst, tyAlias}).kind in NilableTypes+GenericTypes and
+          if result.skipTypes({tyGenericInst, tyAlias}).kind in NilableTypes+GenericTypes+{tyForward} and
               n.sons[2].kind == nkNilLit:
             result = freshType(result, prev)
             result.flags.incl(tfNotNil)