diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t6162-inheritance.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6162-inheritance.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t6162-inheritance.scala | 4 | ||||
-rw-r--r-- | test/files/neg/t6162-overriding.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6162-overriding.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t6162-overriding.scala | 8 |
6 files changed, 22 insertions, 0 deletions
diff --git a/test/files/neg/t6162-inheritance.check b/test/files/neg/t6162-inheritance.check new file mode 100644 index 0000000000..69112d7f86 --- /dev/null +++ b/test/files/neg/t6162-inheritance.check @@ -0,0 +1,4 @@ +t6162-inheritance.scala:4: error: class SubFoo inherits from class Foo, but inheriting from that class is deprecated: `Foo` will be made final in a future version. +class SubFoo extends Foo + ^ +one error found
\ No newline at end of file diff --git a/test/files/neg/t6162-inheritance.flags b/test/files/neg/t6162-inheritance.flags new file mode 100644 index 0000000000..65faf53579 --- /dev/null +++ b/test/files/neg/t6162-inheritance.flags @@ -0,0 +1 @@ +-Xfatal-warnings -deprecation
\ No newline at end of file diff --git a/test/files/neg/t6162-inheritance.scala b/test/files/neg/t6162-inheritance.scala new file mode 100644 index 0000000000..67bd4466c3 --- /dev/null +++ b/test/files/neg/t6162-inheritance.scala @@ -0,0 +1,4 @@ +@deprecatedInheritance("`Foo` will be made final in a future version.", "2.10.0") +class Foo + +class SubFoo extends Foo
\ No newline at end of file diff --git a/test/files/neg/t6162-overriding.check b/test/files/neg/t6162-overriding.check new file mode 100644 index 0000000000..14221ddc63 --- /dev/null +++ b/test/files/neg/t6162-overriding.check @@ -0,0 +1,4 @@ +t6162-overriding.scala:7: error: method bar in class SubBar overrides method bar in class Bar, but overriding this member is deprecated: `bar` will be made private in a future version. + override def bar = 43 + ^ +one error found diff --git a/test/files/neg/t6162-overriding.flags b/test/files/neg/t6162-overriding.flags new file mode 100644 index 0000000000..65faf53579 --- /dev/null +++ b/test/files/neg/t6162-overriding.flags @@ -0,0 +1 @@ +-Xfatal-warnings -deprecation
\ No newline at end of file diff --git a/test/files/neg/t6162-overriding.scala b/test/files/neg/t6162-overriding.scala new file mode 100644 index 0000000000..4907dbb075 --- /dev/null +++ b/test/files/neg/t6162-overriding.scala @@ -0,0 +1,8 @@ +class Bar { + @deprecatedOverriding("`bar` will be made private in a future version.", "2.10.0") + def bar = 42 +} + +class SubBar extends Bar { + override def bar = 43 +}
\ No newline at end of file |