Report diagnostic on overrides of experimental members
Unless they're experimental themselves #KT-22759 In Progress
This commit is contained in:
Vendored
+35
@@ -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() {}
|
||||
}
|
||||
Reference in New Issue
Block a user