diff --git a/akka-docs-dev/rst/scala/code/docs/stream/FlowGraphDocSpec.scala b/akka-docs-dev/rst/scala/code/docs/stream/FlowGraphDocSpec.scala index 3f7d8a1e972..f0e8ec0651a 100644 --- a/akka-docs-dev/rst/scala/code/docs/stream/FlowGraphDocSpec.scala +++ b/akka-docs-dev/rst/scala/code/docs/stream/FlowGraphDocSpec.scala @@ -208,7 +208,7 @@ class FlowGraphDocSpec extends AkkaSpec { import FanInShape.Init class PriorityWorkerPoolShape2[In, Out](_init: Init[Out] = Name("PriorityWorkerPool")) - extends FanInShape[Out](_init) { + extends FanInShape[Out](_init) { protected override def construct(i: Init[Out]) = new PriorityWorkerPoolShape2(i) val jobsIn = newInlet[In]("jobsIn") diff --git a/akka-stream/src/main/scala/akka/stream/Graph.scala b/akka-stream/src/main/scala/akka/stream/Graph.scala index 790e27e7779..edab6d8b41e 100644 --- a/akka-stream/src/main/scala/akka/stream/Graph.scala +++ b/akka-stream/src/main/scala/akka/stream/Graph.scala @@ -4,12 +4,13 @@ package akka.stream import akka.stream.impl.StreamLayout +import scala.annotation.unchecked.uncheckedVariance trait Graph[+S <: Shape, +M] { /** * Type-level accessor for the shape parameter of this graph. */ - type Shape = S + type Shape = S @uncheckedVariance /** * The shape of a graph is all that is externally visible: its inlets and outlets. */