summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-07-16 15:43:25 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-07-17 15:19:25 +0200
commit15d2a92be024641c4e7a0f78dc2832206c63f0bb (patch)
treee3f2c38badf9dbe5a402caacf3875d150333c5fd /compiler
parent102b71f42e699afa1c319bd56cb44fbb22507cc0 (diff)
downloadNim-15d2a92be024641c4e7a0f78dc2832206c63f0bb.tar.gz
fixes #11747
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 0c20d2c20..bdf742bf1 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1414,6 +1414,9 @@ proc semDeref(c: PContext, n: PNode): PNode =
   var t = skipTypes(n.sons[0].typ, {tyGenericInst, tyVar, tyLent, tyAlias, tySink, tyOwned})
   case t.kind
   of tyRef, tyPtr: n.typ = t.lastSon
+  of tyTypeDesc:
+    # typeof(x[]) is still a typedesc:
+    n.typ = makeTypeDesc(c, t.lastSon.lastSon)
   else: result = nil
   #GlobalError(n.sons[0].info, errCircumNeedsPointer)