code cleanup: there is no tyOptRef

This commit is contained in:
Andreas Rumpf 2019-02-22 19:42:11 +01:00
commit 721bf7188b
14 changed files with 36 additions and 47 deletions

View file

@ -294,7 +294,7 @@ proc mapTypeToAstX(cache: IdentCache; t: PType; info: TLineInfo;
result.add atomicType("static", mNone)
if t.n != nil:
result.add t.n.copyTree
of tyOptAsRef: assert(false, "mapTypeToAstX")
of tyOwned: result = mapTypeToBracket("owned", mBuiltinType, t, info)
proc opMapTypeToAst*(cache: IdentCache; t: PType; info: TLineInfo): PNode =
result = mapTypeToAstX(cache, t, info, inst=false, allowRecursionX=true)