diff options
author | Paul Phillips <paulp@improving.org> | 2009-06-30 18:27:18 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-06-30 18:27:18 +0000 |
commit | b640b4c70f3dfbc2db48d81f5d853227e3a0c732 (patch) | |
tree | bca56b977361c33d2709a4975e4f52d12f2da51b /test/files | |
parent | d14b4a117e477505afa4b2417133d3b8325ba4d3 (diff) | |
download | scala-b640b4c70f3dfbc2db48d81f5d853227e3a0c732.tar.gz scala-b640b4c70f3dfbc2db48d81f5d853227e3a0c732.tar.bz2 scala-b640b4c70f3dfbc2db48d81f5d853227e3a0c732.zip |
Enhanced error message when a type error is bec...
Enhanced error message when a type error is because of identically named
classes, one in scala.* and one not.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/bug2102.check | 6 | ||||
-rw-r--r-- | test/files/neg/bug2102.scala | 3 | ||||
-rw-r--r-- | test/files/neg/names-defaults-neg.check | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/test/files/neg/bug2102.check b/test/files/neg/bug2102.check new file mode 100644 index 0000000000..075aa85e48 --- /dev/null +++ b/test/files/neg/bug2102.check @@ -0,0 +1,6 @@ +bug2102.scala:2: error: type mismatch; + found : java.util.Iterator[Int] + required: scala.Iterator[_] + val x: Iterator[_] = new java.util.ArrayList[Int]().iterator + ^ +one error found diff --git a/test/files/neg/bug2102.scala b/test/files/neg/bug2102.scala new file mode 100644 index 0000000000..6a85eba0ae --- /dev/null +++ b/test/files/neg/bug2102.scala @@ -0,0 +1,3 @@ +object Test { + val x: Iterator[_] = new java.util.ArrayList[Int]().iterator +}
\ No newline at end of file diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check index 0a1ddf8286..f4ab2e5f99 100644 --- a/test/files/neg/names-defaults-neg.check +++ b/test/files/neg/names-defaults-neg.check @@ -94,10 +94,10 @@ List[Int]'s type parameters do not match type T's expected parameters: class Lis ^ error: type mismatch; found : List[Int] - required: List[List[List[List[X forSome { type X }]]]] + required: List[List[scala.List[List[X forSome { type X }]]]] names-defaults-neg.scala:80: error: type mismatch; found : List[Int] - required: List[List[?]] + required: scala.List[scala.List[?]] def test6[T](x: List[List[T]] = List(1,2)) = x ^ names-defaults-neg.scala:83: error: type mismatch; |