Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt
T
Alexander Udalov 4f53a54115 Drop Experimental.Impact, simplify related code and tests
See https://github.com/Kotlin/KEEP/issues/95#issuecomment-383889404

Drop Experimental.changesMayBreak, Experimental.Impact, the concept of
signature/body usage, same module exemption. Make the majority of tests
single-module because there is now no difference in the checker between
usages from the same module or from another module
2018-05-04 13:48:24 +02:00

27 lines
340 B
Kotlin
Vendored

// !API_VERSION: 1.3
// FILE: api.kt
package api
@Experimental
annotation class E
open class Base {
@E
open fun foo() {}
}
// 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<!>()
}