Report diagnostic on overrides of experimental members

Unless they're experimental themselves

 #KT-22759 In Progress
This commit is contained in:
Alexander Udalov
2018-01-03 15:02:19 +01:00
parent 29c35e6686
commit 153c86c069
12 changed files with 382 additions and 17 deletions
@@ -0,0 +1,35 @@
// !API_VERSION: 1.3
@Experimental(Experimental.Level.WARNING)
annotation class E1
@Experimental(Experimental.Level.WARNING)
annotation class E3
interface Base1 {
@E1
fun foo()
}
interface Base2 {
fun foo()
}
interface Base3 {
@E3
fun foo()
}
class DerivedA : Base1, Base2, Base3 {
override fun <!EXPERIMENTAL_OVERRIDE, EXPERIMENTAL_OVERRIDE!>foo<!>() {}
}
class DerivedB : Base1, Base3 {
@E3
override fun <!EXPERIMENTAL_OVERRIDE!>foo<!>() {}
}
class DerivedC : Base1, Base2, Base3 {
@E1
@E3
override fun foo() {}
}