summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-08-10 00:56:07 +0000
committerPaul Phillips <paulp@improving.org>2011-08-10 00:56:07 +0000
commitff7416d88b67b26c5f066ef08801517c09bd2859 (patch)
treee33566f785eb9c0377bc30524a1679b00ec8362c /test/files/neg
parent879e5af47db2ae6807aef26dd786e6ea920ac554 (diff)
downloadscala-ff7416d88b67b26c5f066ef08801517c09bd2859.tar.gz
scala-ff7416d88b67b26c5f066ef08801517c09bd2859.tar.bz2
scala-ff7416d88b67b26c5f066ef08801517c09bd2859.zip
Expanded the range of a warning, and made suppr...
Expanded the range of a warning, and made suppressed warnings visible. Modified the positioning of "permanently hidden" errors so that when there is more than one, the later ones are not ignored. Also changed the error suppression code to emit the error anyway if -Ydebug was given (it is prefixed with "[suppressed] ".) Since I can't be the only one who wondered where his errors were vanishing to. No review.
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/permanent-blindness.check10
-rw-r--r--test/files/neg/permanent-blindness.flags1
-rw-r--r--test/files/neg/permanent-blindness.scala22
3 files changed, 33 insertions, 0 deletions
diff --git a/test/files/neg/permanent-blindness.check b/test/files/neg/permanent-blindness.check
new file mode 100644
index 0000000000..18b4543707
--- /dev/null
+++ b/test/files/neg/permanent-blindness.check
@@ -0,0 +1,10 @@
+permanent-blindness.scala:10: error: imported `Bippy' is permanently hidden by definition of class Bippy in package bar
+ import foo.{ Bippy, Bop, Dingus }
+ ^
+permanent-blindness.scala:10: error: imported `Bop' is permanently hidden by definition of object Bop in package bar
+ import foo.{ Bippy, Bop, Dingus }
+ ^
+permanent-blindness.scala:10: error: imported `Dingus' is permanently hidden by definition of object Dingus in package bar
+ import foo.{ Bippy, Bop, Dingus }
+ ^
+three errors found
diff --git a/test/files/neg/permanent-blindness.flags b/test/files/neg/permanent-blindness.flags
new file mode 100644
index 0000000000..e8fb65d50c
--- /dev/null
+++ b/test/files/neg/permanent-blindness.flags
@@ -0,0 +1 @@
+-Xfatal-warnings \ No newline at end of file
diff --git a/test/files/neg/permanent-blindness.scala b/test/files/neg/permanent-blindness.scala
new file mode 100644
index 0000000000..b6d09d6dce
--- /dev/null
+++ b/test/files/neg/permanent-blindness.scala
@@ -0,0 +1,22 @@
+package foo {
+ class Bippy
+ object Bop {
+ def fff = 5
+ }
+ object Dingus
+}
+
+package bar {
+ import foo.{ Bippy, Bop, Dingus }
+
+ class Bippy
+ object Bop
+ object Dingus
+
+
+ class Ding {
+ def fff = 5
+
+ def g = new Bippy
+ }
+} \ No newline at end of file