summaryrefslogtreecommitdiff
path: root/test/files/pos/ticket2251.scala
diff options
context:
space:
mode:
authorAntonio Cunei <antonio.cunei@epfl.ch>2010-05-28 15:34:32 +0000
committerAntonio Cunei <antonio.cunei@epfl.ch>2010-05-28 15:34:32 +0000
commit0b006e7762a8c3ec2f5d02c8c7c34b09511e6a47 (patch)
treed506f42b6847b9ece5240d062bb9e4b97a450019 /test/files/pos/ticket2251.scala
parent5da8a164cdd276e191ab6429e5a64e02529bbe45 (diff)
downloadscala-0b006e7762a8c3ec2f5d02c8c7c34b09511e6a47.tar.gz
scala-0b006e7762a8c3ec2f5d02c8c7c34b09511e6a47.tar.bz2
scala-0b006e7762a8c3ec2f5d02c8c7c34b09511e6a47.zip
Re-enabled a number of previously disabled tests;
according to my tests, they all currently work.
Diffstat (limited to 'test/files/pos/ticket2251.scala')
-rw-r--r--test/files/pos/ticket2251.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/files/pos/ticket2251.scala b/test/files/pos/ticket2251.scala
new file mode 100644
index 0000000000..7b6efb0ea0
--- /dev/null
+++ b/test/files/pos/ticket2251.scala
@@ -0,0 +1,25 @@
+
+// Martin: I am not sure this is a solvable problem right now. I'll leave it in pending.
+// derived from pos/bug1001
+class A
+trait B[T <: B[T]] extends A
+class C extends B[C]
+class D extends B[D]
+
+class Data {
+ // force computing lub of C and D (printLubs enabled:)
+
+/*
+lub of List(D, C) at depth 2
+ lub of List(D, C) at depth 1
+ lub of List(D, C) at depth 0
+ lub of List(D, C) is A
+ lub of List(D, C) is B[_1] forSome { type _1 >: D with C <: A }
+lub of List(D, C) is B[_2] forSome { type _2 >: D with C{} <: B[_1] forSome { type _1 >: D with C{} <: A } }
+*/
+// --> result = WRONG
+
+ // should be: B[X] forSome {type X <: B[X]} -- can this be done automatically? for now, just detect f-bounded polymorphism and fall back to more coarse approximation
+
+ val data: List[A] = List(new C, new D)
+}