@@ -40,7 +40,7 @@ template asink*(t: PType): PSym = getAttachedOp(c.g, t, attachedSink)
4040
4141proc fillBody (c: var TLiftCtx ; t: PType ; body, x, y: PNode )
4242proc produceSym (g: ModuleGraph ; c: PContext ; typ: PType ; kind: TTypeAttachedOp ;
43- info: TLineInfo ; idgen: IdGenerator ; isDistinct = false ): PSym
43+ info: TLineInfo ; idgen: IdGenerator ): PSym
4444
4545proc createTypeBoundOps * (g: ModuleGraph ; c: PContext ; orig: PType ; info: TLineInfo ;
4646 idgen: IdGenerator )
@@ -1063,9 +1063,7 @@ proc produceSymDistinctType(g: ModuleGraph; c: PContext; typ: PType;
10631063 assert typ.kind == tyDistinct
10641064 let baseType = typ.elementType
10651065 if getAttachedOp (g, baseType, kind) == nil :
1066- # TODO : fixme `isDistinct` is a fix for #23552; remove it after
1067- # `-d:nimPreviewNonVarDestructor` becomes the default
1068- discard produceSym (g, c, baseType, kind, info, idgen, isDistinct = true )
1066+ discard produceSym (g, c, baseType, kind, info, idgen)
10691067 result = getAttachedOp (g, baseType, kind)
10701068 setAttachedOp (g, idgen.module, typ, kind, result )
10711069
@@ -1104,7 +1102,7 @@ proc symDupPrototype(g: ModuleGraph; typ: PType; owner: PSym; kind: TTypeAttache
11041102 incl result .flags, sfGeneratedOp
11051103
11061104proc symPrototype (g: ModuleGraph ; typ: PType ; owner: PSym ; kind: TTypeAttachedOp ;
1107- info: TLineInfo ; idgen: IdGenerator ; isDiscriminant = false ; isDistinct = false ): PSym =
1105+ info: TLineInfo ; idgen: IdGenerator ; isDiscriminant = false ): PSym =
11081106 if kind == attachedDup:
11091107 return symDupPrototype (g, typ, owner, kind, info, idgen)
11101108
@@ -1115,7 +1113,7 @@ proc symPrototype(g: ModuleGraph; typ: PType; owner: PSym; kind: TTypeAttachedOp
11151113 idgen, result , info)
11161114
11171115 if kind == attachedDestructor and g.config.selectedGC in {gcArc, gcOrc, gcAtomicArc} and
1118- ((g.config.isDefined (" nimPreviewNonVarDestructor" ) and not isDiscriminant) or (typ.kind in {tyRef, tyString, tySequence} and not isDistinct )):
1116+ ((g.config.isDefined (" nimPreviewNonVarDestructor" ) and not isDiscriminant) or (typ.kind in {tyRef, tyString, tySequence})):
11191117 dest.typ = typ
11201118 else :
11211119 dest.typ = makeVarType (typ.owner, typ, idgen)
@@ -1157,13 +1155,13 @@ proc genTypeFieldCopy(c: var TLiftCtx; t: PType; body, x, y: PNode) =
11571155 body.add newAsgnStmt (xx, yy)
11581156
11591157proc produceSym (g: ModuleGraph ; c: PContext ; typ: PType ; kind: TTypeAttachedOp ;
1160- info: TLineInfo ; idgen: IdGenerator ; isDistinct = false ): PSym =
1158+ info: TLineInfo ; idgen: IdGenerator ): PSym =
11611159 if typ.kind == tyDistinct:
11621160 return produceSymDistinctType (g, c, typ, kind, info, idgen)
11631161
11641162 result = getAttachedOp (g, typ, kind)
11651163 if result == nil :
1166- result = symPrototype (g, typ, typ.owner, kind, info, idgen, isDistinct = isDistinct )
1164+ result = symPrototype (g, typ, typ.owner, kind, info, idgen)
11671165
11681166 var a = TLiftCtx (info: info, g: g, kind: kind, c: c, asgnForType: typ, idgen: idgen,
11691167 fn: result )
0 commit comments