fixes #6445 (concepts for the JS target)

This commit is contained in:
Andreas Rumpf 2017-11-22 11:37:16 +01:00
commit 85b00aff56

View file

@ -191,11 +191,12 @@ proc mapType(typ: PType): TJSTypeKind =
of tyObject, tyArray, tyTuple, tyOpenArray, tyVarargs: of tyObject, tyArray, tyTuple, tyOpenArray, tyVarargs:
result = etyObject result = etyObject
of tyNil: result = etyNull of tyNil: result = etyNull
of tyGenericInst, tyGenericParam, tyGenericBody, tyGenericInvocation, of tyGenericParam, tyGenericBody, tyGenericInvocation,
tyNone, tyFromExpr, tyForward, tyEmpty, tyNone, tyFromExpr, tyForward, tyEmpty,
tyExpr, tyStmt, tyTypeDesc, tyTypeClasses, tyVoid, tyAlias: tyExpr, tyStmt, tyTypeDesc, tyBuiltInTypeClass, tyCompositeTypeClass,
tyAnd, tyOr, tyNot, tyAnything, tyVoid:
result = etyNone result = etyNone
of tyInferred: of tyGenericInst, tyInferred, tyAlias, tyUserTypeClass, tyUserTypeClassInst:
result = mapType(typ.lastSon) result = mapType(typ.lastSon)
of tyStatic: of tyStatic:
if t.n != nil: result = mapType(lastSon t) if t.n != nil: result = mapType(lastSon t)