diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-04-15 19:00:29 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-04-15 19:00:29 -0700 |
commit | e337bfca56572b88dbc75a0e5d20f862be5f4ce0 (patch) | |
tree | e78dfa660dc4ddfebc0a7e9755fbf77530b067fc /test/files/pos | |
parent | 835fbfb152f8f806639473a96883e002bd8706c4 (diff) | |
parent | 660c8fd4c89c4f7121d131138c5f9fceaefa4992 (diff) | |
download | scala-e337bfca56572b88dbc75a0e5d20f862be5f4ce0.tar.gz scala-e337bfca56572b88dbc75a0e5d20f862be5f4ce0.tar.bz2 scala-e337bfca56572b88dbc75a0e5d20f862be5f4ce0.zip |
Merge pull request #2336 from retronym/topic/deprecated-inheritance-tweak
SI-7312 @deprecatedInheritance now ignores same-file subclasses
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t6162-inheritance.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t6162-inheritance.scala | 22 | ||||
-rw-r--r-- | test/files/pos/t7315.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7315.scala | 4 |
4 files changed, 28 insertions, 0 deletions
diff --git a/test/files/pos/t6162-inheritance.flags b/test/files/pos/t6162-inheritance.flags new file mode 100644 index 0000000000..c6bfaf1f64 --- /dev/null +++ b/test/files/pos/t6162-inheritance.flags @@ -0,0 +1 @@ +-deprecation -Xfatal-warnings diff --git a/test/files/pos/t6162-inheritance.scala b/test/files/pos/t6162-inheritance.scala new file mode 100644 index 0000000000..fca751edab --- /dev/null +++ b/test/files/pos/t6162-inheritance.scala @@ -0,0 +1,22 @@ +package scala.t6126 + +// Don't warn about inheritance in the same file. +// We might use that as a prelude to sealing a class. + +@deprecatedInheritance("`Foo` will be made final in a future version.", "2.10.0") +class Foo + +class SubFoo extends Foo + +@deprecatedInheritance() +trait T + +object SubT extends T + +@deprecatedInheritance() +trait S + +object O { + new S { + } +} diff --git a/test/files/pos/t7315.flags b/test/files/pos/t7315.flags new file mode 100644 index 0000000000..d1b831ea87 --- /dev/null +++ b/test/files/pos/t7315.flags @@ -0,0 +1 @@ +-deprecation -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t7315.scala b/test/files/pos/t7315.scala new file mode 100644 index 0000000000..0abcea2451 --- /dev/null +++ b/test/files/pos/t7315.scala @@ -0,0 +1,4 @@ +package scala.pack + +@deprecatedInheritance +class C[@specialized A]
\ No newline at end of file |