diff options
Diffstat (limited to 'compiler/semmagic.nim')
-rw-r--r-- | compiler/semmagic.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim index c3c032147..1e579a959 100644 --- a/compiler/semmagic.nim +++ b/compiler/semmagic.nim @@ -49,7 +49,9 @@ proc semTypeOf(c: PContext; n: PNode): PNode = else: m = mode.intVal result = newNodeI(nkTypeOfExpr, n.info) + inc c.inTypeofContext let typExpr = semExprWithType(c, n[1], if m == 1: {efInTypeof} else: {}) + dec c.inTypeofContext result.add typExpr result.typ = makeTypeDesc(c, typExpr.typ) |