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:
dubochet 2006-01-26 09:32:34 +00:00
parent 1a261db784
commit 628036e780
9 changed files with 85 additions and 0 deletions

4
test/files/neg/bug510.check Executable file
View File

@ -0,0 +1,4 @@
bug510.scala:19 error: cyclic aliasing or subtyping involving type T
def g(t: e.T): Unit = {
^
one error found

26
test/files/neg/bug510.scala Executable file
View File

@ -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;
()
}
()
}
}

4
test/files/neg/bug512.check Executable file
View File

@ -0,0 +1,4 @@
bug512.scala:3 error: not found: value something
val xxx = something ||
^
one error found

5
test/files/neg/bug512.scala Executable file
View File

@ -0,0 +1,5 @@
package test;
class Foo {
val xxx = something ||
something_else;
}

6
test/files/neg/bug515.check Executable file
View File

@ -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

8
test/files/neg/bug515.scala Executable file
View File

@ -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
}

11
test/files/neg/bug85.check Executable file
View File

@ -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

7
test/files/pos/bug514.scala Executable file
View File

@ -0,0 +1,7 @@
object Test extends Application {
object Truc {
override def toString() = "oui"
def toString(bool: Boolean) = "chaispas"
}
val tata: String = Truc.toString
}

14
test/files/pos/bug516.scala Executable file
View File

@ -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 =>
}
}