FIR: don't render resolved type annotations in favor of attributes
This commit is contained in:
committed by
teamcityserver
parent
06379ec587
commit
c33608e009
Vendored
+4
-4
@@ -1,11 +1,11 @@
|
||||
public final class A : R|kotlin/Any| {
|
||||
public final fun arrays(s: @R|test/Ann|(klass = <getClass>(<getClass>(R|kotlin/Int|))) R|kotlin/Array<kotlin/Int>|, t: @R|test/Ann|(klass = <getClass>(<getClass>(R|kotlin/IntArray|))) R|kotlin/Array<kotlin/IntArray>|, u: @R|test/Ann|(klass = <getClass>(<getClass>(R|kotlin/Int|))) R|kotlin/Array<kotlin/Array<kotlin/Int>>|, v: @R|test/Ann|(klass = <getClass>(<getClass>(R|kotlin/String|))) R|kotlin/Array<kotlin/Array<kotlin/Array<kotlin/String>>>|): R|kotlin/Unit|
|
||||
public final fun arrays(s: R|@R|test/Ann|(klass = <getClass>(<getClass>(R|kotlin/Int|))) kotlin/Array<kotlin/Int>|, t: R|@R|test/Ann|(klass = <getClass>(<getClass>(R|kotlin/IntArray|))) kotlin/Array<kotlin/IntArray>|, u: R|@R|test/Ann|(klass = <getClass>(<getClass>(R|kotlin/Int|))) kotlin/Array<kotlin/Array<kotlin/Int>>|, v: R|@R|test/Ann|(klass = <getClass>(<getClass>(R|kotlin/String|))) kotlin/Array<kotlin/Array<kotlin/Array<kotlin/String>>>|): R|kotlin/Unit|
|
||||
|
||||
public final fun generic(s: @R|test/Ann|(klass = <getClass>(<getClass>(R|test/Generic|))) R|kotlin/String|): R|kotlin/Unit|
|
||||
public final fun generic(s: R|@R|test/Ann|(klass = <getClass>(<getClass>(R|test/Generic|))) kotlin/String|): R|kotlin/Unit|
|
||||
|
||||
public final fun innerGeneric(s: @R|test/Ann|(klass = <getClass>(<getClass>(R|test/InnerGeneric.Inner|))) R|kotlin/String|): R|kotlin/Unit|
|
||||
public final fun innerGeneric(s: R|@R|test/Ann|(klass = <getClass>(<getClass>(R|test/InnerGeneric.Inner|))) kotlin/String|): R|kotlin/Unit|
|
||||
|
||||
public final fun simple(s: @R|test/Ann|(klass = <getClass>(<getClass>(R|test/Simple|))) R|kotlin/String|): R|kotlin/Unit|
|
||||
public final fun simple(s: R|@R|test/Ann|(klass = <getClass>(<getClass>(R|test/Simple|))) kotlin/String|): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|test/A|
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
public final fun @R|test/A|() R|kotlin/String|.foo(): R|kotlin/Unit|
|
||||
public final fun R|@R|test/A|() kotlin/String|.foo(): R|kotlin/Unit|
|
||||
|
||||
@R|kotlin/annotation/Target|(allowedTargets = <implicitArrayOf>(R|kotlin/annotation/AnnotationTarget.TYPE|())) public final annotation class A : R|kotlin/Annotation| {
|
||||
public constructor(): R|test/A|
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
||||
}
|
||||
|
||||
public final class SimpleTypeAnnotation : R|kotlin/Any| {
|
||||
public final fun foo(x: @R|test/A|() R|kotlin/ranges/IntRange|): @R|test/A|() R|kotlin/Int|
|
||||
public final fun foo(x: R|@R|test/A|() kotlin/ranges/IntRange|): R|@R|test/A|() kotlin/Int|
|
||||
|
||||
public constructor(): R|test/SimpleTypeAnnotation|
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
}
|
||||
|
||||
public abstract interface Foo<T : R|kotlin/Number|> : R|java/io/Serializable| {
|
||||
public abstract interface Foo<T : R|@R|test/A|() kotlin/Number|> : R|java/io/Serializable| {
|
||||
public abstract fun <E, F : R|E|> bar(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
public final class TypeAnnotationWithArguments : R|kotlin/Any| {
|
||||
public final fun foo(param: @R|test/Ann|(x = String(param), y = Double(3.14)) R|kotlin/ranges/IntRange|): @R|test/Ann|(x = String(fun), y = Double(2.72)) R|kotlin/Unit|
|
||||
public final fun foo(param: R|@R|test/Ann|(x = String(param), y = Double(3.14)) kotlin/ranges/IntRange|): R|@R|test/Ann|(x = String(fun), y = Double(2.72)) kotlin/Unit|
|
||||
|
||||
public constructor(): R|test/TypeAnnotationWithArguments|
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public final fun foo(bar: R|kotlin/collections/Map<kotlin/String, kotlin/collections/List<kotlin/Int>>|): R|kotlin/Unit|
|
||||
public final fun foo(bar: R|kotlin/collections/Map<@R|test/A|() kotlin/String, kotlin/collections/List<@R|test/A|() kotlin/Int>>|): R|kotlin/Unit|
|
||||
|
||||
@R|kotlin/annotation/Target|(allowedTargets = <implicitArrayOf>(R|kotlin/annotation/AnnotationTarget.TYPE|())) public final annotation class A : R|kotlin/Annotation| {
|
||||
public constructor(): R|test/A|
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: varargOfLambdasWithReceiver.kt
|
||||
public final fun runLambdas(vararg values: @R|kotlin/ExtensionFunctionType|() R|kotlin/Array<out @ExtensionFunctionType kotlin/Function1<kotlin/String, kotlin/Unit>>|): R|kotlin/Unit| {
|
||||
public final fun runLambdas(vararg values: R|kotlin/Array<out @ExtensionFunctionType kotlin/Function1<kotlin/String, kotlin/Unit>>|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/runLambdas|(vararg(runLambdas@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=Unknown> {
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ FILE: RedundantExplicitTypeChecker.kt
|
||||
|
||||
}
|
||||
public final fun annotated(): R|kotlin/Unit| {
|
||||
lval x: @R|A|() R|kotlin/Int| = Int(1)
|
||||
lval x: R|@R|A|() kotlin/Int| = Int(1)
|
||||
}
|
||||
public final object SomeObj : R|kotlin/Any| {
|
||||
private constructor(): R|SomeObj| {
|
||||
|
||||
compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantReturnUnitTypeChecker.fir.txt
Vendored
+1
-1
@@ -22,7 +22,7 @@ FILE: RedundantReturnUnitTypeChecker.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun too(): @R|kotlin/Annotation|() R|@R|kotlin/Annotation|() kotlin/Unit| {
|
||||
public final fun too(): R|@R|kotlin/Annotation|() kotlin/Unit| {
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ FILE: nestedExtensionFunctionType.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_2(a: R|A|, vararg zs: @R|kotlin/ExtensionFunctionType|() R|kotlin/Array<out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|): R|kotlin/Unit| {
|
||||
public final fun test_2(a: R|A|, vararg zs: R|kotlin/Array<out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|): R|kotlin/Unit| {
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/zs|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
|
||||
@@ -63,15 +63,15 @@ FILE: main.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
@R|annotations/Simple|() public abstract fun foo(@R|annotations/WithString|(String(abc)) arg: @R|annotations/Simple|() R|kotlin/Double|): R|kotlin/Unit|
|
||||
@R|annotations/Simple|() public abstract fun foo(@R|annotations/WithString|(String(abc)) arg: R|@R|annotations/Simple|() kotlin/Double|): R|kotlin/Unit|
|
||||
|
||||
@R|annotations/Complex|(R|annotations/WithInt.WithInt|(Int(7)), R|annotations/WithString.WithString|(String())) public abstract val v: R|kotlin/String|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
@R|annotations/WithString|(String(xyz)) public final class Second : @R|annotations/WithInt|(Int(0)) R|test/First| {
|
||||
@R|annotations/WithString|(String(xyz)) public final class Second : R|@R|annotations/WithInt|(Int(0)) test/First| {
|
||||
public constructor(y: R|kotlin/Char|): R|test/Second| {
|
||||
super<@R|annotations/WithInt|(Int(0)) R|test/First|>()
|
||||
super<R|@R|annotations/WithInt|(Int(0)) test/First|>()
|
||||
}
|
||||
|
||||
public final val y: R|kotlin/Char| = R|<local>/y|
|
||||
@@ -90,4 +90,4 @@ FILE: main.kt
|
||||
}
|
||||
|
||||
}
|
||||
@R|annotations/WithInt|(Int(24)) @R|annotations/VeryComplex|(Float(3.14), Double(6.67E-11), Boolean(false), Long(123456789012345), Null(null)) @R|annotations/WithInt|(Int(24)) @R|annotations/VeryComplex|(Float(3.14), Double(6.67E-11), Boolean(false), Long(123456789012345), Null(null)) public final typealias Third = @R|annotations/Simple|() R|test/Second|
|
||||
@R|annotations/WithInt|(Int(24)) @R|annotations/VeryComplex|(Float(3.14), Double(6.67E-11), Boolean(false), Long(123456789012345), Null(null)) @R|annotations/WithInt|(Int(24)) @R|annotations/VeryComplex|(Float(3.14), Double(6.67E-11), Boolean(false), Long(123456789012345), Null(null)) public final typealias Third = R|@R|annotations/Simple|() test/Second|
|
||||
|
||||
@@ -1001,12 +1001,6 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM
|
||||
|
||||
override fun visitResolvedTypeRef(resolvedTypeRef: FirResolvedTypeRef) {
|
||||
val kind = resolvedTypeRef.functionTypeKind
|
||||
val annotations = if (kind.withPrettyRender()) {
|
||||
resolvedTypeRef.annotations.dropExtensionFunctionAnnotation()
|
||||
} else {
|
||||
resolvedTypeRef.annotations
|
||||
}
|
||||
annotations.renderAnnotations()
|
||||
print("R|")
|
||||
val coneType = resolvedTypeRef.type
|
||||
print(coneType.renderFunctionType(kind, resolvedTypeRef.annotations.any {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
public/*package*/ open class AnnotatedTypeInFun : R|kotlin/Any| {
|
||||
public/*package*/ open fun foo(@R|test/AnnotatedTypeInFun.Anno|(String(a)) a: @R|test/AnnotatedTypeInFun.Anno|(String(a)) R|ft<kotlin/String, kotlin/String?>|, @R|test/AnnotatedTypeInFun.Anno|(String(b)) b: @R|test/AnnotatedTypeInFun.Anno|(String(b)) R|ft<kotlin/String, kotlin/String?>|): R|kotlin/Unit|
|
||||
public/*package*/ open fun foo(@R|test/AnnotatedTypeInFun.Anno|(String(a)) a: R|ft<kotlin/String, kotlin/String?>|, @R|test/AnnotatedTypeInFun.Anno|(String(b)) b: R|ft<kotlin/String, kotlin/String?>|): R|kotlin/Unit|
|
||||
|
||||
public/*package*/ constructor(): R|test/AnnotatedTypeInFun|
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
public open class ModalityOfFakeOverrides : R|java/util/AbstractList<ft<kotlin/String, kotlin/String?>>| {
|
||||
@R|java/lang/Override|() @R|org/jetbrains/annotations/NotNull|() public open operator fun get(index: R|kotlin/Int|): R|@EnhancedNullability kotlin/String|
|
||||
@R|java/lang/Override|() @R|org/jetbrains/annotations/NotNull|() public open operator fun get(index: R|kotlin/Int|): R|@EnhancedNullability @R|java/lang/Override|() kotlin/String|
|
||||
|
||||
public constructor(): R|test/ModalityOfFakeOverrides|
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ KtFirNamedClassOrObjectSymbol:
|
||||
visibility: Public
|
||||
|
||||
KtFirValueParameterSymbol:
|
||||
annotatedType: [Anno2()] I
|
||||
annotatedType: [Anno2()] @R|Anno2|() I
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: null
|
||||
@@ -125,7 +125,7 @@ KtFirValueParameterSymbol:
|
||||
symbolKind: LOCAL
|
||||
|
||||
KtFirFunctionSymbol:
|
||||
annotatedType: [Anno3()] I
|
||||
annotatedType: [Anno3()] @R|Anno3|() I
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: /X.f
|
||||
@@ -146,7 +146,7 @@ KtFirFunctionSymbol:
|
||||
visibility: Public
|
||||
|
||||
KtFirKotlinPropertySymbol:
|
||||
annotatedType: [Anno4()] I
|
||||
annotatedType: [Anno4()] @R|Anno4|() I
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: /X.x
|
||||
@@ -183,7 +183,7 @@ KtFirNamedClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: X
|
||||
origin: SOURCE
|
||||
superTypes: [[Anno1()] I]
|
||||
superTypes: [[Anno1()] @R|Anno1|() I]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
|
||||
Reference in New Issue
Block a user