Removed and consolidated several redundant tests which had
filenames "bugXXX" and "tXXX" where XXX == XXX. No review. git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25559 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
a978f24ba3
commit
00f8a5baf3
|
@ -1,4 +0,0 @@
|
|||
object Test extends App {
|
||||
val xs = Array(1, 2, 3)
|
||||
Console.println(xs.filter(_ >= 0).length)
|
||||
}
|
|
@ -1,105 +0,0 @@
|
|||
// I suspect the stack overflow is occurring when the compiler is determining the types for the following line at the end of the file:-
|
||||
// val data = List(N26,N25)
|
||||
|
||||
abstract class A
|
||||
{
|
||||
// commenting out the following line (only) leads to successful compilation
|
||||
protected val data: List[A]
|
||||
}
|
||||
|
||||
trait B[T <: B[T]] extends A { self: T => }
|
||||
|
||||
abstract class C extends A
|
||||
{
|
||||
// commenting out the following line (only) leads to successful compilation
|
||||
protected val data: List[C]
|
||||
}
|
||||
|
||||
abstract class D extends C with B[D] {}
|
||||
|
||||
abstract class Ee extends C with B[Ee]
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
object N1 extends D
|
||||
{
|
||||
val data = Nil
|
||||
}
|
||||
|
||||
object N2 extends D
|
||||
{
|
||||
val data = Nil
|
||||
}
|
||||
|
||||
object N5 extends D
|
||||
{
|
||||
val data = List(N1)
|
||||
}
|
||||
|
||||
object N6 extends D
|
||||
{
|
||||
val data = List(N1)
|
||||
}
|
||||
|
||||
object N8 extends D
|
||||
{
|
||||
val data = List(N1)
|
||||
}
|
||||
|
||||
object N10 extends D
|
||||
{
|
||||
val data = Nil
|
||||
}
|
||||
|
||||
object N13 extends D
|
||||
{
|
||||
val data = List(N2)
|
||||
}
|
||||
|
||||
object N14 extends D
|
||||
{
|
||||
val data = List(N5,N10,N8)
|
||||
}
|
||||
|
||||
object N15 extends D
|
||||
{
|
||||
val data = List(N14)
|
||||
}
|
||||
|
||||
object N16 extends D
|
||||
{
|
||||
val data = List(N13,N6,N15)
|
||||
}
|
||||
|
||||
object N17 extends D
|
||||
{
|
||||
val data = List(N16)
|
||||
}
|
||||
|
||||
object N21 extends D
|
||||
{
|
||||
val data = List(N16)
|
||||
}
|
||||
|
||||
object N22 extends D
|
||||
{
|
||||
val data = List(N17)
|
||||
}
|
||||
|
||||
object N25 extends D
|
||||
{
|
||||
val data = List(N22)
|
||||
}
|
||||
|
||||
object N26 extends Ee
|
||||
{
|
||||
val data = List(N21,N17)
|
||||
}
|
||||
|
||||
// Commenting out the following object (only) leads to successful compilation
|
||||
object N31 extends Ee
|
||||
{
|
||||
// If we use List[C](N26,N25), we achieve successful compilation
|
||||
val data = List[C](N26,N25)
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
object Test extends App {
|
||||
trait C[T] {
|
||||
def t: T
|
||||
}
|
||||
|
||||
def b: Option[C[_]] = null
|
||||
|
||||
def c = b match {
|
||||
case Some(b) => b.t
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
trait C[A]
|
||||
|
||||
object C {
|
||||
implicit def ipl[A](implicit from: A => Ordered[A]): C[A] = null
|
||||
}
|
||||
|
||||
object P {
|
||||
def foo[A](i: A, j: A)(implicit c: C[A]): Unit = ()
|
||||
}
|
||||
|
||||
class ImplicitChainTest {
|
||||
def testTrivial: Unit = {
|
||||
P.foo('0', '9')
|
||||
P.foo('0', '9')
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
object Test extends App {
|
||||
class Bob[T]
|
||||
implicit def foo2bar[T](xs: List[T]): Bob[T] = new Bob[T]
|
||||
var x: Bob[Int] = null
|
||||
x = List(1,2,3)
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
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)
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
object Breakdown {
|
||||
def unapplySeq(x: Int): Some[List[String]] = Some(List("", "there"))
|
||||
}
|
||||
object Test {
|
||||
42 match {
|
||||
case Breakdown("") => // needed to trigger bug
|
||||
case Breakdown("foo") => // needed to trigger bug
|
||||
case Breakdown("", who) => println ("hello " + who)
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
import scala.annotation._
|
||||
import scala.annotation.unchecked._
|
||||
import scala.collection._
|
||||
|
||||
|
||||
package object buffer {
|
||||
val broken = new ArrayVec2() // commenting out this line causes the file to compile.
|
||||
|
||||
val works = Class.forName("buffer.ArrayVec2").newInstance().asInstanceOf[ArrayVec2]
|
||||
}
|
||||
|
||||
package buffer {
|
||||
object Main {
|
||||
// ArrayVec2 can be compiled, instantiated and used.
|
||||
def main(args: Array[String]) { println(works) }
|
||||
}
|
||||
|
||||
trait ElemType { type Element; type Component <: ElemType }
|
||||
trait Float1 extends ElemType { type Element = Float; type Component = Float1}
|
||||
class Vec2 extends ElemType { type Element = Vec2; type Component = Float1 }
|
||||
|
||||
abstract class BaseSeq[T <: ElemType, E]
|
||||
extends IndexedSeq[E] with IndexedSeqOptimized[E, IndexedSeq[E]] {
|
||||
def length = 1
|
||||
def apply(i: Int) :E
|
||||
}
|
||||
|
||||
abstract class GenericSeq[T <: ElemType] extends BaseSeq[T, T#Element]
|
||||
trait DataArray[T <: ElemType] extends BaseSeq[T, T#Element]
|
||||
trait DataView[T <: ElemType] extends BaseSeq[T, T#Element]
|
||||
abstract class BaseFloat1 extends BaseSeq[Float1, Float]
|
||||
|
||||
class ArrayFloat1 extends BaseFloat1 with DataArray[Float1] {
|
||||
def apply(i: Int) :Float = 0f
|
||||
}
|
||||
|
||||
class ViewFloat1 extends BaseFloat1 with DataView[Float1] {
|
||||
def apply(i: Int) :Float = 0f
|
||||
}
|
||||
|
||||
class ArrayVec2(val backingSeq: ArrayFloat1)
|
||||
extends GenericSeq[Vec2] with DataArray[Vec2] {
|
||||
def this() = this(new ArrayFloat1)
|
||||
def apply(i: Int) :Vec2 = null
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
import collection.JavaConversions._
|
||||
import java.{ util => ju }
|
||||
|
||||
object Test {
|
||||
def m[P <% ju.List[Int]](l: P) = 1
|
||||
m(List(1)) // bug: should compile
|
||||
}
|
|
@ -1,3 +1,8 @@
|
|||
object A {
|
||||
println("""This a "raw" string ending with a "double quote"""")
|
||||
}
|
||||
|
||||
object Test extends App {
|
||||
val xs = Array(1, 2, 3)
|
||||
Console.println(xs.filter(_ >= 0).length)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,115 @@
|
|||
// was t1001.scala
|
||||
class Foo;
|
||||
|
||||
object Overload{
|
||||
val foo = classOf[Foo].getConstructors()(0)
|
||||
foo.getDeclaringClass
|
||||
}
|
||||
|
||||
// was bug1001.scala
|
||||
|
||||
// I suspect the stack overflow is occurring when the compiler is determining the types for the following line at the end of the file:-
|
||||
// val data = List(N26,N25)
|
||||
|
||||
abstract class A
|
||||
{
|
||||
// commenting out the following line (only) leads to successful compilation
|
||||
protected val data: List[A]
|
||||
}
|
||||
|
||||
trait B[T <: B[T]] extends A { self: T => }
|
||||
|
||||
abstract class C extends A
|
||||
{
|
||||
// commenting out the following line (only) leads to successful compilation
|
||||
protected val data: List[C]
|
||||
}
|
||||
|
||||
abstract class D extends C with B[D] {}
|
||||
|
||||
abstract class Ee extends C with B[Ee]
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
object N1 extends D
|
||||
{
|
||||
val data = Nil
|
||||
}
|
||||
|
||||
object N2 extends D
|
||||
{
|
||||
val data = Nil
|
||||
}
|
||||
|
||||
object N5 extends D
|
||||
{
|
||||
val data = List(N1)
|
||||
}
|
||||
|
||||
object N6 extends D
|
||||
{
|
||||
val data = List(N1)
|
||||
}
|
||||
|
||||
object N8 extends D
|
||||
{
|
||||
val data = List(N1)
|
||||
}
|
||||
|
||||
object N10 extends D
|
||||
{
|
||||
val data = Nil
|
||||
}
|
||||
|
||||
object N13 extends D
|
||||
{
|
||||
val data = List(N2)
|
||||
}
|
||||
|
||||
object N14 extends D
|
||||
{
|
||||
val data = List(N5,N10,N8)
|
||||
}
|
||||
|
||||
object N15 extends D
|
||||
{
|
||||
val data = List(N14)
|
||||
}
|
||||
|
||||
object N16 extends D
|
||||
{
|
||||
val data = List(N13,N6,N15)
|
||||
}
|
||||
|
||||
object N17 extends D
|
||||
{
|
||||
val data = List(N16)
|
||||
}
|
||||
|
||||
object N21 extends D
|
||||
{
|
||||
val data = List(N16)
|
||||
}
|
||||
|
||||
object N22 extends D
|
||||
{
|
||||
val data = List(N17)
|
||||
}
|
||||
|
||||
object N25 extends D
|
||||
{
|
||||
val data = List(N22)
|
||||
}
|
||||
|
||||
object N26 extends Ee
|
||||
{
|
||||
val data = List(N21,N17)
|
||||
}
|
||||
|
||||
// Commenting out the following object (only) leads to successful compilation
|
||||
object N31 extends Ee
|
||||
{
|
||||
// If we use List[C](N26,N25), we achieve successful compilation
|
||||
val data = List[C](N26,N25)
|
||||
}
|
||||
|
|
|
@ -7,3 +7,10 @@ object Test {
|
|||
case Breakdown("", who) => println ("hello " + who)
|
||||
}
|
||||
}
|
||||
object Test2 {
|
||||
42 match {
|
||||
case Breakdown("") => // needed to trigger bug
|
||||
case Breakdown("foo") => // needed to trigger bug
|
||||
case Breakdown("", who) => println ("hello " + who)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,3 +7,8 @@ object Test {
|
|||
implicitly[mutable.Map[Int, String] => ju.Dictionary[Int, String]]
|
||||
|
||||
}
|
||||
|
||||
object Test2 {
|
||||
def m[P <% ju.List[Int]](l: P) = 1
|
||||
m(List(1)) // bug: should compile
|
||||
}
|
Loading…
Reference in New Issue