Introduce Experimental and UseExperimental annotations

#KT-22759 In Progress
This commit is contained in:
Alexander Udalov
2017-12-12 14:18:42 +01:00
parent 366f630236
commit 0bf0a315ed
31 changed files with 1551 additions and 12 deletions
@@ -0,0 +1,30 @@
// !API_VERSION: 1.3
// FILE: api.kt
package api
@Experimental(Experimental.Level.WARNING, [Experimental.Impact.COMPILATION])
annotation class ExperimentalCompilationAPI
interface I
@ExperimentalCompilationAPI
class Impl : I
// 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