summaryrefslogtreecommitdiff
path: root/test/neg/vincent1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/neg/vincent1.scala')
-rw-r--r--test/neg/vincent1.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/neg/vincent1.scala b/test/neg/vincent1.scala
new file mode 100644
index 0000000000..fb047305ff
--- /dev/null
+++ b/test/neg/vincent1.scala
@@ -0,0 +1,19 @@
+object test {
+
+ trait A { type T; }
+
+ trait B { type T; }
+
+ class Functor(x: A) { type T = x.T }
+
+ def functor(x: A): B { type T = x.T } =
+ new B {
+ type T = x.T;
+ };
+
+ val a = new A { type T = String };
+ val b = functor(a);
+
+ val s: b.T = "coucou";
+
+}