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,28 @@
// !API_VERSION: 1.3
// MODULE: api
// FILE: api.kt
package api
@Experimental(Experimental.Level.ERROR, [Experimental.Impact.COMPILATION])
annotation class E
open class Base {
@E
open fun foo() {}
}
// MODULE: usage(api)
// FILE: usage.kt
package usage
import api.*
class Derived : Base() {
override fun <!EXPERIMENTAL_OVERRIDE_ERROR!>foo<!>() {}
}
fun test(b: Base) {
b.<!EXPERIMENTAL_API_USAGE_ERROR!>foo<!>()
}