diff options
author | Martin Odersky <odersky@gmail.com> | 2008-08-18 14:53:44 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-08-18 14:53:44 +0000 |
commit | aa43994c9648183a81cba2557dc3188ef6ca341e (patch) | |
tree | 4fb2ee654c885db2cc549a7d8ebb1d7c20cdfbdd /test | |
parent | 98ba45e4f615bdb6b04694b3e3099cb1029679ba (diff) | |
download | scala-aa43994c9648183a81cba2557dc3188ef6ca341e.tar.gz scala-aa43994c9648183a81cba2557dc3188ef6ca341e.tar.bz2 scala-aa43994c9648183a81cba2557dc3188ef6ca341e.zip |
corrected several problems with error reporting...
corrected several problems with error reporting: positions checked
twice, warnings masking errors. Refined solution of forward implicits
without5 result type.
Diffstat (limited to 'test')
-rwxr-xr-x | test/files/neg/t1049.check | 4 | ||||
-rwxr-xr-x | test/files/neg/t1049.scala | 9 | ||||
-rwxr-xr-x | test/files/pos/t1001.scala | 6 | ||||
-rwxr-xr-x | test/files/pos/t1049.scala | 9 | ||||
-rw-r--r-- | test/pending/pos/t0816.scala | 12 | ||||
-rwxr-xr-x | test/pending/pos/t1053.scala | 6 | ||||
-rwxr-xr-x | test/pending/pos/t1131.scala | 4 | ||||
-rw-r--r-- | test/pending/run/t1044.scala | 4 |
8 files changed, 54 insertions, 0 deletions
diff --git a/test/files/neg/t1049.check b/test/files/neg/t1049.check new file mode 100755 index 0000000000..4a63cb175d --- /dev/null +++ b/test/files/neg/t1049.check @@ -0,0 +1,4 @@ +t1049.scala:6: error: not found: value a + case a : a.MapTo => + ^ +one error found diff --git a/test/files/neg/t1049.scala b/test/files/neg/t1049.scala new file mode 100755 index 0000000000..2f59ed3c09 --- /dev/null +++ b/test/files/neg/t1049.scala @@ -0,0 +1,9 @@ +class J { + type tttt[a, b] <: _root_.scala.collection.mutable.Map[a, b] + + def r(aa : tttt[String, String]) = { + 0 match { + case a : a.MapTo => + } + } +} diff --git a/test/files/pos/t1001.scala b/test/files/pos/t1001.scala new file mode 100755 index 0000000000..88321e6e8e --- /dev/null +++ b/test/files/pos/t1001.scala @@ -0,0 +1,6 @@ +class Foo; + +object Overload{ + val foo = classOf[Foo].getConstructors()(0) + foo.getDeclaringClass +} diff --git a/test/files/pos/t1049.scala b/test/files/pos/t1049.scala new file mode 100755 index 0000000000..dad83579a6 --- /dev/null +++ b/test/files/pos/t1049.scala @@ -0,0 +1,9 @@ +class J { + type tttt[a, b] <: _root_.scala.collection.mutable.Map[a, b] + + def r(a : tttt[String, String]) = { + 0 match { + case a : a.MapTo => + } + } +} diff --git a/test/pending/pos/t0816.scala b/test/pending/pos/t0816.scala new file mode 100644 index 0000000000..44282ea872 --- /dev/null +++ b/test/pending/pos/t0816.scala @@ -0,0 +1,12 @@ +abstract class Atest(val data: String) + +case class Btest(override val data: String, val b: boolean) extends Atest(data) + +case class Ctest(override val data: String) extends Btest(data, true) + +class testCaseClass { + def test(x: Atest) = x match { + case Ctest(data) => Console.println("C") + case Btest(data, b) => Console.println("B") + } +} diff --git a/test/pending/pos/t1053.scala b/test/pending/pos/t1053.scala new file mode 100755 index 0000000000..1d4dfb637e --- /dev/null +++ b/test/pending/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/pending/pos/t1131.scala b/test/pending/pos/t1131.scala new file mode 100755 index 0000000000..5ef980348d --- /dev/null +++ b/test/pending/pos/t1131.scala @@ -0,0 +1,4 @@ +trait A { self: Any { def p: Any } => + def f(b: => Unit) {} + f { p } +} diff --git a/test/pending/run/t1044.scala b/test/pending/run/t1044.scala new file mode 100644 index 0000000000..136cc51af2 --- /dev/null +++ b/test/pending/run/t1044.scala @@ -0,0 +1,4 @@ +object Main extends Application{ + val ducks = Array[AnyRef]("Huey", "Dewey", "Louie") + ducks.elements/*.asInstanceOf[Iterator[String]]*/ +} |