aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t6162-inheritance.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t6162-inheritance.scala')
-rw-r--r--tests/untried/pos/t6162-inheritance.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/untried/pos/t6162-inheritance.scala b/tests/untried/pos/t6162-inheritance.scala
new file mode 100644
index 000000000..fca751eda
--- /dev/null
+++ b/tests/untried/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 {
+ }
+}