diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index 6730861d81..4122ec2fd6 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -137,9 +137,8 @@ proc createTypeBoundOps(tracked: PEffects, typ: PType; info: TLineInfo; explicit createTypeBoundOps(tracked.graph, tracked.c, realType.lastSon, info) createTypeBoundOps(tracked.graph, tracked.c, typ, info, tracked.c.idgen) - if tracked.config.selectedGC == gcRefc or - optSeqDestructors in tracked.config.globalOptions or - tfHasAsgn in typ.flags: + if (tfHasAsgn in typ.flags) or + optSeqDestructors in tracked.config.globalOptions: tracked.owner.flags.incl sfInjectDestructors proc isLocalSym(a: PEffects, s: PSym): bool = diff --git a/tests/collections/tseq.nim b/tests/collections/tseq.nim index ee5f47a3b1..0f8084c787 100644 --- a/tests/collections/tseq.nim +++ b/tests/collections/tseq.nim @@ -240,11 +240,3 @@ block: # bug #17197 result = true doAssert needlemanWunsch("ABC", "DEFG", 1, 2, 3) - -block: # bug #12340 - func consume(x: sink seq[int]) = - x[0] += 5 - - let x = @[1, 2, 3, 4] - consume x - doAssert x == @[1, 2, 3, 4] diff --git a/tests/stdlib/tmarshal.nim b/tests/stdlib/tmarshal.nim index 5bdbc6bdec..32991ccc91 100644 --- a/tests/stdlib/tmarshal.nim +++ b/tests/stdlib/tmarshal.nim @@ -1,9 +1,7 @@ discard """ - matrix: "--mm:orc" + matrix: "--mm:orc; --mm:refc" """ -# TODO: --mm:refc - import std/marshal import std/[assertions, objectdollar, streams]