Add tests for KT-12199 to prevent regression

#KT-12199 Obsolete

Original commit: 712b2c8117
This commit is contained in:
Zalim Bashorov
2017-04-10 20:00:45 +03:00
parent 4009a45bcd
commit 6bedbfb67f
4 changed files with 51 additions and 7 deletions
@@ -1,3 +1,15 @@
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() {
foo()
internalBar()
}
@InternalClassAnnotation
class Local {
@InternalFunctionAnnotation
fun foo() {}
}
}
@InternalClassAnnotation
class Class {
@InternalFunctionAnnotation
fun foo() {}
@InternalClassAnnotation
class Nested {
@InternalFunctionAnnotation
fun foo() {}
}
}