summaryrefslogtreecommitdiff
path: root/test/files/pos/t1210a.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t1210a.scala')
-rw-r--r--test/files/pos/t1210a.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/t1210a.scala b/test/files/pos/t1210a.scala
new file mode 100644
index 0000000000..b3492f96e4
--- /dev/null
+++ b/test/files/pos/t1210a.scala
@@ -0,0 +1,15 @@
+// both styles of abstraction should behave the same
+// related to 1210 because that bug broke the OO version below
+trait OO {
+ abstract class Test { self =>
+ type T
+
+ val v: Test {type T = self.T} = self.v.v
+ }
+}
+
+trait FP {
+ abstract class Test[T] {
+ val v: Test[T] = v.v
+ }
+}