From 6a79e29cd85194e4ebf1bb38732caddd88896925 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 28 Jan 2010 05:46:36 +0000 Subject: Moved some test cases from pending to files sin... Moved some test cases from pending to files since the bugs they were watching for seem to be fixed. Moved some other test cases from pending to disabled because they deceptively claim to pass while investigation reveals the ticket needs to remain open. Closes #1996, #2660. --- test/disabled/pos/t1053.scala | 6 +++ test/disabled/pos/t2619.scala | 80 ++++++++++++++++++++++++++++++++++++++ test/disabled/pos/ticket2251.scala | 25 ++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 test/disabled/pos/t1053.scala create mode 100644 test/disabled/pos/t2619.scala create mode 100644 test/disabled/pos/ticket2251.scala (limited to 'test/disabled/pos') diff --git a/test/disabled/pos/t1053.scala b/test/disabled/pos/t1053.scala new file mode 100644 index 0000000000..1d4dfb637e --- /dev/null +++ b/test/disabled/pos/t1053.scala @@ -0,0 +1,6 @@ +trait T[A] { trait U { type W = A; val x = 3 } } + +object Test { + val x : ({ type V = T[this.type] })#V = null + val y = new x.U { } +} diff --git a/test/disabled/pos/t2619.scala b/test/disabled/pos/t2619.scala new file mode 100644 index 0000000000..565bc9572b --- /dev/null +++ b/test/disabled/pos/t2619.scala @@ -0,0 +1,80 @@ +abstract class F { + final def apply(x: Int): AnyRef = null +} +abstract class AbstractModule { + def as: List[AnyRef] + def ms: List[AbstractModule] + def fs: List[F] = Nil + def rs(x: Int): List[AnyRef] = fs.map(_(x)) +} +abstract class ModuleType1 extends AbstractModule {} +abstract class ModuleType2 extends AbstractModule {} + +object ModuleAE extends ModuleType1 { + def as = Nil + def ms = Nil +} +object ModuleAF extends ModuleType2 { + def as = Nil + def ms = List(ModuleAE) +} +object ModuleAG extends ModuleType1 { + def as = List("") + def ms = Nil +} +object ModuleAI extends ModuleType1 { + def as = Nil + def ms = List(ModuleAE) +} +object ModuleAK extends ModuleType2 { + def as = Nil + def ms = List(ModuleAF) +} +object ModuleAL extends ModuleType1 { + def as = Nil + def ms = List( + ModuleAG, + ModuleAI + ) +} +object ModuleAM extends ModuleType1 { + def as = Nil + def ms = List( + ModuleAL, + ModuleAE + ) ::: List(ModuleAK) +} +object ModuleBE extends ModuleType1 { + def as = Nil + def ms = Nil +} +object ModuleBF extends ModuleType2 { + def as = Nil + def ms = List(ModuleBE) +} +object ModuleBG extends ModuleType1 { + def as = List("") + def ms = Nil +} +object ModuleBI extends ModuleType1 { + def as = Nil + def ms = List(ModuleBE) +} +object ModuleBK extends ModuleType2 { + def as = Nil + def ms = List(ModuleBF) +} +object ModuleBL extends ModuleType1 { + def as = Nil + def ms = List( + ModuleBG, + ModuleBI + ) +} +object ModuleBM extends ModuleType1 { + def as = Nil + def ms = List( + ModuleBL, + ModuleBE + ) ::: List(ModuleBK) +} \ No newline at end of file diff --git a/test/disabled/pos/ticket2251.scala b/test/disabled/pos/ticket2251.scala new file mode 100644 index 0000000000..7b6efb0ea0 --- /dev/null +++ b/test/disabled/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) +} -- cgit v1.2.3