Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsages.kt
T
Alexander Udalov 29c35e6686 Do not require experimental propagation for body usages in same module
Unless it's a usage inside the body of an effectively public inline
function

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

33 lines
640 B
Kotlin
Vendored

// !API_VERSION: 1.3
// MODULE: api
// FILE: api.kt
package api
@Experimental(Experimental.Level.WARNING, [Experimental.Impact.COMPILATION])
annotation class ExperimentalCompilationAPI
interface I
@ExperimentalCompilationAPI
class Impl : I
// MODULE: usage(api)
// FILE: usage.kt
package usage
import api.*
open class Base(val i: I)
@UseExperimental(ExperimentalCompilationAPI::class)
class Derived : Base(Impl())
@UseExperimental(ExperimentalCompilationAPI::class)
class Delegated : I by Impl()
@UseExperimental(ExperimentalCompilationAPI::class)
val delegatedProperty by Impl()
operator fun I.getValue(x: Any?, y: Any?) = null