Add tests for KT-12199 to prevent regression
#KT-12199 Obsolete
Original commit: 712b2c8117
This commit is contained in:
@@ -1,3 +1,15 @@
|
|||||||
fun foo() { }
|
fun foo() { }
|
||||||
|
|
||||||
internal fun internalBar() {}
|
internal fun internalBar() {}
|
||||||
|
|
||||||
|
@Target(AnnotationTarget.FILE)
|
||||||
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
|
internal annotation class InternalFileAnnotation()
|
||||||
|
|
||||||
|
@Target(AnnotationTarget.FUNCTION)
|
||||||
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
|
internal annotation class InternalFunctionAnnotation()
|
||||||
|
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
|
internal annotation class InternalClassAnnotation()
|
||||||
|
|||||||
@@ -1,4 +1,25 @@
|
|||||||
|
@file:InternalFileAnnotation
|
||||||
|
|
||||||
|
@InternalFunctionAnnotation
|
||||||
fun test() {
|
fun test() {
|
||||||
foo()
|
foo()
|
||||||
internalBar()
|
internalBar()
|
||||||
|
|
||||||
|
@InternalClassAnnotation
|
||||||
|
class Local {
|
||||||
|
@InternalFunctionAnnotation
|
||||||
|
fun foo() {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@InternalClassAnnotation
|
||||||
|
class Class {
|
||||||
|
@InternalFunctionAnnotation
|
||||||
|
fun foo() {}
|
||||||
|
|
||||||
|
@InternalClassAnnotation
|
||||||
|
class Nested {
|
||||||
|
@InternalFunctionAnnotation
|
||||||
|
fun foo() {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,10 @@ internal annotation class InternalFileAnnotation1()
|
|||||||
@Retention(AnnotationRetention.SOURCE)
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
internal annotation class InternalClassAnnotation1()
|
internal annotation class InternalClassAnnotation1()
|
||||||
|
|
||||||
|
@Target(AnnotationTarget.FUNCTION)
|
||||||
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
|
internal annotation class InternalFunctionAnnotation1()
|
||||||
|
|
||||||
internal open class InternalClass1
|
internal open class InternalClass1
|
||||||
|
|
||||||
abstract class ClassA1(internal val member: Int)
|
abstract class ClassA1(internal val member: Int)
|
||||||
|
|||||||
+12
-5
@@ -1,6 +1,4 @@
|
|||||||
// TODO uncomment annotations when KT-12199 will be fixed
|
@file:InternalFileAnnotation1
|
||||||
|
|
||||||
//@file:InternalFileAnnotation1
|
|
||||||
|
|
||||||
package test2
|
package test2
|
||||||
|
|
||||||
@@ -8,13 +6,22 @@ import test1.*
|
|||||||
|
|
||||||
internal class FromInternalClass1: InternalClass1()
|
internal class FromInternalClass1: InternalClass1()
|
||||||
|
|
||||||
//@InternalClassAnnotation
|
@InternalClassAnnotation1
|
||||||
class FromClassA1 : ClassA1(10)
|
class FromClassA1 : ClassA1(10) {
|
||||||
|
@InternalClassAnnotation1
|
||||||
|
class Nested {
|
||||||
|
@InternalFunctionAnnotation1
|
||||||
|
fun foo() {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class FromClassB1 : ClassB1() {
|
class FromClassB1 : ClassB1() {
|
||||||
internal override val member = 10
|
internal override val member = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@InternalFunctionAnnotation1
|
||||||
|
fun foo() {}
|
||||||
|
|
||||||
fun box() {
|
fun box() {
|
||||||
internalProp
|
internalProp
|
||||||
internalFun()
|
internalFun()
|
||||||
|
|||||||
Reference in New Issue
Block a user