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

@ -194,14 +194,13 @@ proc mapType(typ: PType): TJSTypeKind =
tyAnd, tyOr, tyNot, tyAnything, tyVoid:
result = etyNone
of tyGenericInst, tyInferred, tyAlias, tyUserTypeClass, tyUserTypeClassInst,
tySink:
tySink, tyOwned:
result = mapType(typ.lastSon)
of tyStatic:
if t.n != nil: result = mapType(lastSon t)
else: result = etyNone
of tyProc: result = etyProc
of tyCString: result = etyString
of tyOptAsRef: doAssert(false, "mapType")
proc mapType(p: PProc; typ: PType): TJSTypeKind =
result = mapType(typ)