diff options
author | Lex Spoon <lex@lexspoon.org> | 2007-01-24 15:10:49 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2007-01-24 15:10:49 +0000 |
commit | 1cbef2171c91fd0e001b4d0c1570c07017877044 (patch) | |
tree | 083210198262960e1c820729da9b6864a8dcfe38 /test/pending/run/deprecated.scala | |
parent | 251f5ce1a63eac4a49e60cce95da6ca73930bb56 (diff) | |
download | scala-1cbef2171c91fd0e001b4d0c1570c07017877044.tar.gz scala-1cbef2171c91fd0e001b4d0c1570c07017877044.tar.bz2 scala-1cbef2171c91fd0e001b4d0c1570c07017877044.zip |
Diffstat (limited to 'test/pending/run/deprecated.scala')
-rw-r--r-- | test/pending/run/deprecated.scala | 35 |
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 + } +} |