add tests on implicit type with inaccessible annotations

^KT-63042
This commit is contained in:
Dmitrii Gridin
2023-10-31 14:26:44 +01:00
committed by Space Team
parent 80fcf9b09e
commit a25bac4bf9
22 changed files with 1803 additions and 0 deletions
@@ -0,0 +1,14 @@
package usage
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
fun implicitType1() = TopLevelObject.expectedType()
object TopLevelObject {
fun expectedType2(): @Anno(privateConstVal) Int = 4
private const val privateConstVal = "privateConstVal"
fun expectedType(): @Anno(<!UNRESOLVED_REFERENCE!>privateConstVal<!>) Int = 4
}
fun implicitType2() = TopLevelObject.expectedType2()
@@ -0,0 +1,14 @@
package usage
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
fun implicitType1() = TopLevelObject.expectedType()
object TopLevelObject {
fun expectedType2(): @Anno(privateConstVal) Int = 4
private const val privateConstVal = "privateConstVal"
fun expectedType(): @Anno(privateConstVal) Int = 4
}
fun implicitType2() = TopLevelObject.expectedType2()
@@ -0,0 +1,14 @@
package usage
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
fun implicitType1() = TopLevelObject.expectedType()
object TopLevelObject {
fun expectedType2(): @Anno(<!UNRESOLVED_REFERENCE!>privateConstVal<!>) Int = 4
private const val privateConstVal = "privateConstVal"
fun expectedType(): @Anno(privateConstVal) Int = 4
}
fun implicitType2() = TopLevelObject.expectedType2()