Added Martin's additional test cases. All tests now suceed under Java 1.4.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@5637 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
1a261db784
commit
628036e780
|
@ -0,0 +1,4 @@
|
|||
bug510.scala:19 error: cyclic aliasing or subtyping involving type T
|
||||
def g(t: e.T): Unit = {
|
||||
^
|
||||
one error found
|
|
@ -0,0 +1,26 @@
|
|||
abstract class C {
|
||||
|
||||
type T <: Any;
|
||||
|
||||
}
|
||||
|
||||
abstract class D[S <: C](_c: S) extends C {
|
||||
|
||||
val c: S = _c;
|
||||
type T <: c.T;
|
||||
|
||||
}
|
||||
|
||||
abstract class E(e: E) extends D[E](e);
|
||||
|
||||
object Test {
|
||||
|
||||
def f(e: E): Unit = {
|
||||
def g(t: e.T): Unit = {
|
||||
val i: Int = t;
|
||||
()
|
||||
}
|
||||
()
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
bug512.scala:3 error: not found: value something
|
||||
val xxx = something ||
|
||||
^
|
||||
one error found
|
|
@ -0,0 +1,5 @@
|
|||
package test;
|
||||
class Foo {
|
||||
val xxx = something ||
|
||||
something_else;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
bug515.scala:7 error: type mismatch;
|
||||
found : java.lang.String
|
||||
required: Test.this.Truc
|
||||
val parent: Truc = file.getMachin
|
||||
^
|
||||
one error found
|
|
@ -0,0 +1,8 @@
|
|||
object Test extends Application {
|
||||
class Truc {
|
||||
def getMachin() = "machin"
|
||||
def getMachinAsTruc() = this
|
||||
}
|
||||
val file = new Truc
|
||||
val parent: Truc = file.getMachin
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
bug85.scala:6 error: type mismatch;
|
||||
found : A.this.C
|
||||
required: A.this.B#C
|
||||
val b: B = new B(new C());
|
||||
^
|
||||
bug85.scala:7 error: type mismatch;
|
||||
found : A.this.b.C
|
||||
required: A.this.C
|
||||
val c: C = b.c;
|
||||
^
|
||||
two errors found
|
|
@ -0,0 +1,7 @@
|
|||
object Test extends Application {
|
||||
object Truc {
|
||||
override def toString() = "oui"
|
||||
def toString(bool: Boolean) = "chaispas"
|
||||
}
|
||||
val tata: String = Truc.toString
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import scala.collection.mutable._;
|
||||
|
||||
class Members;
|
||||
|
||||
object subscriber extends Subscriber[Message[String] with Undoable, Members] {
|
||||
def notify(pub: Members, event: Message[String] with Undoable): Unit =
|
||||
(event: Message[String]) match {
|
||||
case Include(elem) => System.err.println("ADD: " + elem);
|
||||
case Remove(elem) => System.err.println("REM: " + elem);
|
||||
//case i : Include[HasTree] with Undoable =>
|
||||
//case r : Remove [HasTree] with Undoable =>
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue