diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-03-29 19:05:13 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-03-30 10:00:46 +0100 |
commit | 54d11fe5451a9f26207ce283f2df1114c89384dd (patch) | |
tree | 72a541fb877533066dc736573d3d765ad08551e4 /test/files/pos/t6162-inheritance.scala | |
parent | 7894c1b24fddc91fbec53a9906e3c8b8e8a4e61a (diff) | |
download | scala-54d11fe5451a9f26207ce283f2df1114c89384dd.tar.gz scala-54d11fe5451a9f26207ce283f2df1114c89384dd.tar.bz2 scala-54d11fe5451a9f26207ce283f2df1114c89384dd.zip |
SI-7312 @deprecatedInheritance now ignores same-file subclasses
This allows us to deprecate external inheritances as a prelude
to sealing a class, without enduring the warnings ourselved in
interlude.
Diffstat (limited to 'test/files/pos/t6162-inheritance.scala')
-rw-r--r-- | test/files/pos/t6162-inheritance.scala | 22 |
1 files changed, 22 insertions, 0 deletions
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 { + } +} |