[LL FIR] FileStructure: process annotations from constructors correctly
^KT-56543
This commit is contained in:
committed by
Space Team
parent
71f48ede53
commit
8387ea8a39
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
class Abc(<expr>@Anno</expr> var i: Int) {
|
||||
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@<ERROR TYPE REF: Symbol not found for Anno>[Types]()
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
fun <reified T : Number> String.collectOfType(i: Int): Sequence<<expr>@kotlin.internal.NoInfer</expr> T> = 4
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@<ERROR TYPE REF: Symbol not found for kotlin.internal.NoInfer>[Types]()
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@<ERROR TYPE REF: HIDDEN: kotlin/internal/NoInfer is invisible>[Unresolved]()
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
// WITH_STDLIB
|
||||
|
||||
class MyClass(
|
||||
<expr>@JvmField</expr>
|
||||
var addCommaWarning: Boolean = false
|
||||
) : A() {
|
||||
|
||||
}
|
||||
|
||||
open class A
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@<ERROR TYPE REF: Symbol not found for JvmField>[Types]()
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|kotlin/jvm/JvmField|[Types]()
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
class ResolveMe(
|
||||
addCommaWarning: <expr>@Anno</expr> Boolean = false
|
||||
) : A() {
|
||||
|
||||
}
|
||||
|
||||
open class A
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Anno|[Types]()
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
class ResolveMe(
|
||||
var addCommaWarning: <expr>@Anno</expr> Boolean = false,
|
||||
) : A() {
|
||||
|
||||
}
|
||||
|
||||
open class A
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Anno|[Types]()
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
class ResolveMe(
|
||||
var addCommaWarning: <expr>@Anno</expr> Boolean = false,
|
||||
second: @Anno Boolean = false,
|
||||
) : A() {
|
||||
|
||||
}
|
||||
|
||||
open class A
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Anno|[Types]()
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
class ResolveMe(
|
||||
var addCommaWarning: <expr>@Anno("abc")</expr> Boolean = false,
|
||||
) : A() {
|
||||
|
||||
}
|
||||
|
||||
open class A
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val value: String)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Anno|[Types](value = String(abc))
|
||||
analysis/low-level-api-fir/testdata/getOrBuildFir/annotations/typeOnAnnotationOnFunctionParameter.kt
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
fun t(addCommaWarning: <expr>@Anno</expr> Boolean) {
|
||||
|
||||
}
|
||||
|
||||
open class A
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Anno|[Types]()
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
|
||||
fun t(addCommaWarning: <expr>@Anno("abcd")</expr> Boolean) {
|
||||
|
||||
}
|
||||
|
||||
open class A
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val value: String)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Anno|[Types](value = String(abcd))
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtParameter
|
||||
|
||||
class Abc(<expr>val i: Int = 4</expr>) {
|
||||
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtParameter
|
||||
FIR element: FirValueParameterImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
[ResolvedTo(BODY_RESOLVE)] i: R|kotlin/Int| = Int(4)
|
||||
Reference in New Issue
Block a user