summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2007-01-24 15:10:49 +0000
committerLex Spoon <lex@lexspoon.org>2007-01-24 15:10:49 +0000
commit1cbef2171c91fd0e001b4d0c1570c07017877044 (patch)
tree083210198262960e1c820729da9b6864a8dcfe38 /test/pending/run
parent251f5ce1a63eac4a49e60cce95da6ca73930bb56 (diff)
downloadscala-1cbef2171c91fd0e001b4d0c1570c07017877044.tar.gz
scala-1cbef2171c91fd0e001b4d0c1570c07017877044.tar.bz2
scala-1cbef2171c91fd0e001b4d0c1570c07017877044.zip
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/deprecated.scala35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/pending/run/deprecated.scala b/test/pending/run/deprecated.scala
new file mode 100644
index 0000000000..122e339d2f
--- /dev/null
+++ b/test/pending/run/deprecated.scala
@@ -0,0 +1,35 @@
+object Test {
+ abstract class AbstractStuff {
+ def dostuff: Unit
+ }
+
+ [postabstract]
+ class BlueStuff extends AbstractStuff {
+ [deprecated] def dostuff = Console.println("blue")
+ def five = "five"
+ }
+
+ class LightBlueStuff extends BlueStuff {
+ [deprecated] override def dostuff = {Console.println("light blue")}
+
+ // warning: deprecated method overrides a concrete method
+ [deprecated] override def five = "light five"
+ }
+
+ // warning: not marked as postabstract
+ class RedStuff extends AbstractStuff {
+ [deprecated] def dostuff = Console.println("red")
+ }
+
+
+ def main(args: Array[String]) {
+ // warning: BlueStuff will be abstract after deprecated methods are removed
+ val blue = new BlueStuff
+
+ // warning: RedStuff will be abstract after deprecated methods are removed
+ val red = new RedStuff
+
+ // warning: dostuff is deprecated
+ blue.dostuff
+ }
+}