blob: 76c0d372c8a3ac9e183e67ab3ae020c5764daa16 (
plain) (
tree)
|
|
trait FlowOps[+Out] {
type Repr[+O] <: FlowOps[O]
}
trait Flow[-In, +Out] extends FlowOps[Out] {
override type Repr[+O] <: Flow[In, O]
def map[T](f: Out => T): Repr[T] /* workaround: expand alias Flow[In, T] */
}
class Test {
def slowFlow: Unit = {
(null: Flow[String, String])
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b)
.map(b => b) // takes an age to compile
}
}
|