FIR: resolve annotations on value & type parameters
This commit is contained in:
+1
-2
@@ -29,9 +29,8 @@ abstract class FirAbstractMemberDeclaration(
|
|||||||
final override val typeParameters = mutableListOf<FirTypeParameter>()
|
final override val typeParameters = mutableListOf<FirTypeParameter>()
|
||||||
|
|
||||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||||
annotations.transformInplace(transformer, data)
|
|
||||||
typeParameters.transformInplace(transformer, data)
|
typeParameters.transformInplace(transformer, data)
|
||||||
|
|
||||||
return this
|
return super<FirAbstractNamedAnnotatedDeclaration>.transformChildren(transformer, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+10
-1
@@ -6,12 +6,21 @@
|
|||||||
package org.jetbrains.kotlin.fir.declarations.impl
|
package org.jetbrains.kotlin.fir.declarations.impl
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
|
import org.jetbrains.kotlin.fir.FirElement
|
||||||
import org.jetbrains.kotlin.fir.FirSession
|
import org.jetbrains.kotlin.fir.FirSession
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirNamedDeclaration
|
import org.jetbrains.kotlin.fir.declarations.FirNamedDeclaration
|
||||||
|
import org.jetbrains.kotlin.fir.transformInplace
|
||||||
|
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
|
|
||||||
abstract class FirAbstractNamedAnnotatedDeclaration(
|
abstract class FirAbstractNamedAnnotatedDeclaration(
|
||||||
session: FirSession,
|
session: FirSession,
|
||||||
psi: PsiElement?,
|
psi: PsiElement?,
|
||||||
final override val name: Name
|
final override val name: Name
|
||||||
) : FirAbstractAnnotatedDeclaration(session, psi), FirNamedDeclaration
|
) : FirAbstractAnnotatedDeclaration(session, psi), FirNamedDeclaration {
|
||||||
|
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||||
|
annotations.transformInplace(transformer, data)
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -31,7 +31,7 @@ class FirDefaultSetterValueParameter(
|
|||||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||||
returnType = returnType.transformSingle(transformer, data)
|
returnType = returnType.transformSingle(transformer, data)
|
||||||
|
|
||||||
return this
|
return super<FirAbstractNamedAnnotatedDeclaration>.transformChildren(transformer, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|||||||
+1
-1
@@ -33,6 +33,6 @@ class FirTypeParameterImpl(
|
|||||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||||
bounds.transformInplace(transformer, data)
|
bounds.transformInplace(transformer, data)
|
||||||
|
|
||||||
return this
|
return super<FirAbstractNamedAnnotatedDeclaration>.transformChildren(transformer, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -29,6 +29,6 @@ class FirValueParameterImpl(
|
|||||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||||
returnType = returnType.transformSingle(transformer, data)
|
returnType = returnType.transformSingle(transformer, data)
|
||||||
|
|
||||||
return this
|
return super<FirAbstractNamedAnnotatedDeclaration>.transformChildren(transformer, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
FILE: Annotations.kt
|
FILE: Annotations.kt
|
||||||
@FILE:R|annotations/Simple|()
|
@FILE:R|annotations/Simple|()
|
||||||
@R|annotations/WithInt|(STUB) public? abstract class First {
|
@R|annotations/WithInt|(STUB) public? abstract class First {
|
||||||
@R|annotations/Simple|() public? abstract function foo(@WithString(STUB) arg: @R|annotations/Simple|() R|kotlin/Double|): R|error: Not supported: FirImplicitTypeImpl|
|
@R|annotations/Simple|() public? abstract function foo(@R|annotations/WithString|(STUB) arg: @R|annotations/Simple|() R|kotlin/Double|): R|error: Not supported: FirImplicitTypeImpl|
|
||||||
|
|
||||||
@R|annotations/Complex|(STUB, STUB) public? abstract property v(val): R|kotlin/String|
|
@R|annotations/Complex|(STUB, STUB) public? abstract property v(val): R|kotlin/String|
|
||||||
public? get(): R|kotlin/String|
|
public? get(): R|kotlin/String|
|
||||||
|
|||||||
Reference in New Issue
Block a user