@@ -1121,9 +1121,16 @@ proc sameTypeAux(x, y: PType, c: var TSameTypeClosure): bool =
1121
1121
result = sameChildrenAux(a, b, c) and sameFlags(a, b)
1122
1122
if result and {ExactGenericParams, ExactTypeDescValues} * c.flags != {}:
1123
1123
result = a.sym.position == b.sym.position
1124
- of tyGenericInvocation, tyGenericBody, tySequence,
1125
- tyOpenArray, tySet, tyRef, tyPtr, tyVar, tyLent, tySink, tyUncheckedArray,
1126
- tyArray, tyProc, tyVarargs, tyOrdinal, tyTypeClasses, tyOpt, tyOwned:
1124
+ of tyBuiltInTypeClass:
1125
+ assert a.len == 1
1126
+ assert a[0 ].len == 0
1127
+ assert b.len == 1
1128
+ assert b[0 ].len == 0
1129
+ result = a[0 ].kind == b[0 ].kind
1130
+ of tyGenericInvocation, tyGenericBody, tySequence, tyOpenArray, tySet, tyRef,
1131
+ tyPtr, tyVar, tyLent, tySink, tyUncheckedArray, tyArray, tyProc, tyVarargs,
1132
+ tyOrdinal, tyCompositeTypeClass, tyUserTypeClass, tyUserTypeClassInst,
1133
+ tyAnd, tyOr, tyNot, tyAnything, tyOpt, tyOwned:
1127
1134
cycleCheck()
1128
1135
if a.kind == tyUserTypeClass and a.n != nil : return a.n == b.n
1129
1136
result = sameChildrenAux(a, b, c)
0 commit comments