summaryrefslogtreecommitdiff
path: root/test/files/neg/t4762.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-22 05:06:57 +0000
committerPaul Phillips <paulp@improving.org>2011-10-22 05:06:57 +0000
commitc7ec0385c7841084634ab39625b3b77df0e7ae2d (patch)
treec34eb5327d8cf2f17cce0c4d20ff366ce0fb4c47 /test/files/neg/t4762.check
parent3a195c71ba21a286d5f7c02ce15a0f22d1503b24 (diff)
downloadscala-c7ec0385c7841084634ab39625b3b77df0e7ae2d.tar.gz
scala-c7ec0385c7841084634ab39625b3b77df0e7ae2d.tar.bz2
scala-c7ec0385c7841084634ab39625b3b77df0e7ae2d.zip
Warn about surprising shadowing.
It's hidden behind -Xlint and pretty specific, but makes me feel better anyway. References SI-4762, no review.
Diffstat (limited to 'test/files/neg/t4762.check')
-rw-r--r--test/files/neg/t4762.check7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t4762.check b/test/files/neg/t4762.check
new file mode 100644
index 0000000000..5e67f2022a
--- /dev/null
+++ b/test/files/neg/t4762.check
@@ -0,0 +1,7 @@
+t4762.scala:15: error: private[this] value x in class B shadows mutable x inherited from class A. Changes to x will not be visible within class B - you may want to give them distinct names.
+ /* (99,99) */ (this.x, this.y),
+ ^
+t4762.scala:48: error: private[this] value x in class Derived shadows mutable x inherited from class Base. Changes to x will not be visible within class Derived - you may want to give them distinct names.
+ class Derived( x : Int ) extends Base( x ) { override def toString = x.toString }
+ ^
+two errors found