blob: 76c0d372c8a3ac9e183e67ab3ae020c5764daa16 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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
}
}
|