Unchecked arrays now have their own type (#9267)

This commit is contained in:
LemonBoy 2018-10-10 21:03:18 +02:00 • committed by Andreas Rumpf
commit 0ead36dae6
15 changed files with 72 additions and 21 deletions

View file

@ -179,7 +179,7 @@ proc mapType(typ: PType): TJSTypeKind =
of tyFloat..tyFloat128: result = etyFloat
of tySet: result = etyObject # map a set to a table
of tyString, tySequence, tyOpt: result = etySeq
of tyObject, tyArray, tyTuple, tyOpenArray, tyVarargs:
of tyObject, tyArray, tyTuple, tyOpenArray, tyVarargs, tyUncheckedArray:
result = etyObject
of tyNil: result = etyNull
of tyGenericParam, tyGenericBody, tyGenericInvocation,
@ -195,7 +195,7 @@ proc mapType(typ: PType): TJSTypeKind =
else: result = etyNone
of tyProc: result = etyProc
of tyCString: result = etyString
of tyUnused, tyOptAsRef: doAssert(false, "mapType")
of tyOptAsRef: doAssert(false, "mapType")
proc mapType(p: PProc; typ: PType): TJSTypeKind =
result = mapType(typ)