Do not report experimental usage errors in import statements

#KT-25545 Fixed
This commit is contained in:
Alexander Udalov
2018-09-19 21:10:47 +03:00
parent 9d27771f86
commit 3e90d367f2
5 changed files with 70 additions and 3 deletions
@@ -0,0 +1,27 @@
// !USE_EXPERIMENTAL: kotlin.Experimental
// FILE: api.kt
package feature.experimental.self
@Experimental
annotation class ImportedMarker
@ImportedMarker
object ImportedClass {
@ImportedMarker
fun importedObjectMember() {}
}
@ImportedMarker
fun importedFunction() {}
@ImportedMarker
val importedProperty = Unit
// FILE: usage.kt
import feature.experimental.self.ImportedMarker
import feature.experimental.self.ImportedClass
import feature.experimental.self.importedFunction
import feature.experimental.self.importedProperty
import feature.experimental.self.ImportedClass.importedObjectMember