Skip to content

Commit

Permalink
fixes more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Jan 29, 2024
1 parent a499b3d commit 6577ced
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/ccgutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ proc encodeType*(m: BModule; t: PType): string =
var kindName = ($t.kind)[2..^1]
kindName[0] = toLower($kindName[0])[0]
case t.kind:
of tyObject, tyEnum, tyDistinct, tyUserTypeClass:
of tyObject, tyEnum, tyDistinct, tyUserTypeClass, tyGenericParam:
encodeSym(m, t.sym)
of tyGenericInst:
of tyGenericInst, tyUserTypeClassInst, tyGenericBody:
let s = t[0].sym
var name = encodeName(s.owner.name.s & "_" & s.name.s & "_" & $s.itemId.item) #TODO review
name.add "I"
Expand Down Expand Up @@ -238,9 +238,9 @@ proc encodeType*(m: BModule; t: PType): string =
if t.n[0].typ.kind == tyFloat: $t.n[0].floatVal.int & "_" & $t.n[1].floatVal.int
else: $t.n[0].intVal & "_" & $t.n[1].intVal
encodeName("range_" & val)
of tyString..tyUInt64, tyPointer, tyBool, tyChar, tyVoid:
of tyString..tyUInt64, tyPointer, tyBool, tyChar, tyVoid, tyAnything, tyNil:
encodeName(kindName)
of tyAlias:
of tyAlias, tyInferred:
encodeType(m, t[0])
else:
assert false, "encodeType " & $t.kind
Expand Down

0 comments on commit 6577ced

Please sign in to comment.