changed test files
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@10345 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
6d8b7a90db
commit
e7d0c2386e
|
@ -0,0 +1,6 @@
|
|||
bug1001.scala:104: error: the type intersection Ee with D is malformed
|
||||
--- because ---
|
||||
no common type instance of base types B[D] and B[Ee] exists
|
||||
val data = List(N26,N25)
|
||||
^
|
||||
one error found
|
|
@ -0,0 +1,105 @@
|
|||
// 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]] requires T extends A {}
|
||||
|
||||
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(N26,N25)
|
||||
}
|
|
@ -3,7 +3,7 @@ bug987.scala:15: error: the type intersection B[D] with B[C] is malformed
|
|||
no common type instance of base types B[C] and B[D] exists
|
||||
class E extends D
|
||||
^
|
||||
bug987.scala:20: error: illegal cyclic reference involving class D
|
||||
bug987.scala:20: error: illegal cyclic reference involving class E
|
||||
class F extends D
|
||||
^
|
||||
two errors found
|
||||
|
|
Loading…
Reference in New Issue