Merge pull request #3580 from yglukhov/js-distinct-type

Fixed JS codegen for distinct types
This commit is contained in:
Andreas Rumpf
2015-11-25 15:03:19 +01:00

View File

@@ -116,7 +116,7 @@ proc genEnumInfo(p: PProc, typ: PType, name: Rope) =
[name, genTypeInfo(p, typ.sons[0])])
proc genTypeInfo(p: PProc, typ: PType): Rope =
let t = typ.skipTypes({tyGenericInst})
let t = typ.skipTypes({tyGenericInst, tyDistinct})
result = "NTI$1" % [rope(t.id)]
if containsOrIncl(p.g.typeInfoGenerated, t.id): return
case t.kind