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>()
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
annotations.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
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
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
|
||||
|
||||
abstract class FirAbstractNamedAnnotatedDeclaration(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
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 {
|
||||
returnType = returnType.transformSingle(transformer, data)
|
||||
|
||||
return this
|
||||
return super<FirAbstractNamedAnnotatedDeclaration>.transformChildren(transformer, data)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
+1
-1
@@ -33,6 +33,6 @@ class FirTypeParameterImpl(
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
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 {
|
||||
returnType = returnType.transformSingle(transformer, data)
|
||||
|
||||
return this
|
||||
return super<FirAbstractNamedAnnotatedDeclaration>.transformChildren(transformer, data)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
FILE: Annotations.kt
|
||||
@FILE:R|annotations/Simple|()
|
||||
@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|
|
||||
public? get(): R|kotlin/String|
|
||||
|
||||
Reference in New Issue
Block a user