Apply constant folding for collection literals to use in annotations
Currently this is achieved with several hacks: - Postpone computation of argument type info when there is no candidate resolver. We have to do this, because we don't have expected type and therefore we could write wrong information to trace - Presume that for annotation calls there is only one candidate resolver and then resolve arguments with expected type (see `getArgumentTypeInfo`), otherwise because of quadratic complexity of the algorithm resolve would be slow
This commit is contained in:
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
package
|
||||
|
||||
public const val ONE: kotlin.Int = 1
|
||||
public val TWO: kotlin.Int = 2
|
||||
public fun getOne(): kotlin.Int
|
||||
public fun getTwo(): kotlin.Int
|
||||
|
||||
public final annotation class Bar : kotlin.Annotation {
|
||||
public constructor Bar(/*0*/ a: kotlin.IntArray = ..., /*1*/ b: kotlin.IntArray = ..., /*2*/ c: kotlin.IntArray = ...)
|
||||
public final val a: kotlin.IntArray
|
||||
public final val b: kotlin.IntArray
|
||||
public final val c: kotlin.IntArray
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final annotation class Baz : kotlin.Annotation {
|
||||
public constructor Baz(/*0*/ a: kotlin.IntArray = ..., /*1*/ b: kotlin.IntArray = ..., /*2*/ c: kotlin.IntArray = ...)
|
||||
public final val a: kotlin.IntArray
|
||||
public final val b: kotlin.IntArray
|
||||
public final val c: kotlin.IntArray
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final annotation class Foo : kotlin.Annotation {
|
||||
public constructor Foo(/*0*/ a: kotlin.IntArray = ..., /*1*/ b: kotlin.IntArray = ...)
|
||||
public final val a: kotlin.IntArray
|
||||
public final val b: kotlin.IntArray
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user