Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt
T
Alexander Udalov 153c86c069 Report diagnostic on overrides of experimental members
Unless they're experimental themselves

 #KT-22759 In Progress
2018-02-08 17:07:22 +01:00

29 lines
438 B
Kotlin
Vendored

// !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<!>()
}