aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/flow.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/flow.scala')
-rw-r--r--tests/pos/flow.scala26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/pos/flow.scala b/tests/pos/flow.scala
new file mode 100644
index 000000000..76c0d372c
--- /dev/null
+++ b/tests/pos/flow.scala
@@ -0,0 +1,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
+ }
+}