summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-01-13 14:56:50 +0100
committerAraq <rumpf_a@web.de>2019-01-13 14:56:50 +0100
commitab99bdfc408e56a2e8a1a3ada21effe983433851 (patch)
treecd68883777dc18185121ee00367cdd6435566d6b /compiler
parent451377f737ab4b21a96c1ca3f3646c86c275a2b3 (diff)
downloadNim-ab99bdfc408e56a2e8a1a3ada21effe983433851.tar.gz
fixes #10136
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 8852cb653..657df36dd 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -403,8 +403,8 @@ proc semIs(c: PContext, n: PNode, flags: TExprFlags): PNode =
       n[1] = makeTypeSymNode(c, lhsType, n[1].info)
       lhsType = n[1].typ
   else:
-    internalAssert c.config, lhsType.base.kind != tyNone
-    if c.inGenericContext > 0 and lhsType.base.containsGenericType:
+    if lhsType.base.kind == tyNone or
+        (c.inGenericContext > 0 and lhsType.base.containsGenericType):
       # BUGFIX: don't evaluate this too early: ``T is void``
       return