diff --git a/drchaos/mutator.nim b/drchaos/mutator.nim index 4f3c3d8..6c356d0 100644 --- a/drchaos/mutator.nim +++ b/drchaos/mutator.nim @@ -262,7 +262,7 @@ template sampleAttempt(call: untyped) = proc sample[T: distinct](x: T; s: var Sampler; r: var Rand; res: var int) = when compiles(mutate(x, 0, false, r)): - sampleAttempt(attempt(s, r, DefaultMutateWeight, res)) # distinct bool lol + sampleAttempt(attempt(s, r, DefaultMutateWeight, res)) else: sample(x.distinctBase, s, r, res) @@ -283,6 +283,9 @@ proc sample[T: SomeNumber](x: T; s: var Sampler; r: var Rand; res: var int) = proc sample[T](x: seq[T]; s: var Sampler; r: var Rand; res: var int) = sampleAttempt(attempt(s, r, DefaultMutateWeight, res)) + when T is PostProcessTypes: + for i in 0..