summary refs log tree commit diff stats
path: root/compiler/vmdeps.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-09-24 11:21:52 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-09-24 11:21:52 +0200
commite879da5791f66f8c7220885682ed623e7dd0daea (patch)
tree9cca68ab2ac77e649725a7f3df846ea3a73faf49 /compiler/vmdeps.nim
parente5cb1a2dd547827ee750abbb21039d1cf0a30988 (diff)
downloadNim-e879da5791f66f8c7220885682ed623e7dd0daea.tar.gz
some work to make 'opt' a first class type
Diffstat (limited to 'compiler/vmdeps.nim')
-rw-r--r--compiler/vmdeps.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/vmdeps.nim b/compiler/vmdeps.nim
index b9bbba551..12fc455bd 100644
--- a/compiler/vmdeps.nim
+++ b/compiler/vmdeps.nim
@@ -250,6 +250,7 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
       result = mapTypeToBracket("ref", mRef, t, info)
   of tyVar: result = mapTypeToBracket("var", mVar, t, info)
   of tySequence: result = mapTypeToBracket("seq", mSeq, t, info)
+  of tyOpt: result = mapTypeToBracket("opt", mOpt, t, info)
   of tyProc:
     if inst:
       result = newNodeX(nkProcTy)
@@ -304,7 +305,7 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
   of tyNot: result = mapTypeToBracket("not", mNot, t, info)
   of tyAnything: result = atomicType("anything", mNone)
   of tyInferred: internalAssert false
-  of tyStatic, tyFromExpr, tyFieldAccessor:
+  of tyStatic, tyFromExpr:
     if inst:
       if t.n != nil: result = t.n.copyTree
       else: result = atomicType("void", mVoid)