Skip to content

Commit 5160b41

Browse files
committed
for Scala 3, remove a type parameter from StreamConverters
I do not fully understand why this was here, but Scala 3 was complaining: "Polymorphic refinement method valueStepper without matching type in parent trait MapOps is no longer allowed" simplifying the code as I have done in this commit compiles on both Scala versions and the tests still pass, and this is an obscure enough corner of the API that I'm not inclined to spend time really digging deeply into it (e.g. attempting to construct a test case that would now compile when it shouldn't, or vice versa)
1 parent 0dbec1f commit 5160b41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/main/scala-2.13+/scala/compat/java8/StreamConverters.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ trait StreamExtensions {
8686

8787
implicit class MapHasParKeyValueStream[K, V, CC[X, Y] <: collection.MapOps[X, Y, collection.Map, _]](cc: CC[K, V]) {
8888
private type MapOpsWithEfficientKeyStepper = collection.MapOps[K, V, collection.Map, _] { def keyStepper[S <: Stepper[_]](implicit shape : StepperShape[K, S]) : S with EfficientSplit }
89-
private type MapOpsWithEfficientValueStepper = collection.MapOps[K, V, collection.Map, _] { def valueStepper[V1 >: V, S <: Stepper[_]](implicit shape : StepperShape[V1, S]) : S with EfficientSplit }
89+
private type MapOpsWithEfficientValueStepper = collection.MapOps[K, V, collection.Map, _] { def valueStepper[S <: Stepper[_]](implicit shape : StepperShape[V, S]) : S with EfficientSplit }
9090
private type MapOpsWithEfficientStepper = collection.MapOps[K, V, collection.Map, _] { def stepper[S <: Stepper[_]](implicit shape : StepperShape[(K, V), S]) : S with EfficientSplit }
9191

9292
/** Create a parallel [[java.util.stream.Stream Java Stream]] for the keys of this map. If

0 commit comments

Comments
 (0)