Fix interpreter tests after changing offset calculation

This commit is contained in:
Ilya Chernikov
2022-03-14 15:43:37 +01:00
committed by teamcity
parent 738c1f34df
commit 53bc593062
71 changed files with 359 additions and 355 deletions
+15 -15
View File
@@ -12,12 +12,12 @@ class A(val a: Int, val b: String) {
fun Int.funWithExtension(other: Int) = this + other
}
const val aSimpleName = A::class.simpleName<!EVALUATED: `A`!>!!<!>
const val aQualifiedName = A::class.qualifiedName<!EVALUATED: `test.A`!>!!<!>
const val aMembers = A::class.members.<!EVALUATED: `val test.A.a: kotlin.Int, val test.A.b: kotlin.String, val test.A.(kotlin.String.)propertyWithExtension: kotlin.Int, fun test.A.(kotlin.Int.)funWithExtension(kotlin.Int): kotlin.Int, fun test.A.equals(kotlin.Any?): kotlin.Boolean, fun test.A.hashCode(): kotlin.Int, fun test.A.toString(): kotlin.String`!>joinToString()<!>
const val aConstructors = A::class.constructors.<!EVALUATED: `fun <init>(kotlin.Int, kotlin.String): test.A`!>joinToString()<!>
const val aVisibility = A::class.visibility.<!EVALUATED: `PUBLIC`!>toString()<!>
const val aSupertypes = A::class.supertypes.<!EVALUATED: `kotlin.Any`!>joinToString()<!>
const val aSimpleName = <!EVALUATED: `A`!>A::class.simpleName!!<!>
const val aQualifiedName = <!EVALUATED: `test.A`!>A::class.qualifiedName!!<!>
const val aMembers = <!EVALUATED: `val test.A.a: kotlin.Int, val test.A.b: kotlin.String, val test.A.(kotlin.String.)propertyWithExtension: kotlin.Int, fun test.A.(kotlin.Int.)funWithExtension(kotlin.Int): kotlin.Int, fun test.A.equals(kotlin.Any?): kotlin.Boolean, fun test.A.hashCode(): kotlin.Int, fun test.A.toString(): kotlin.String`!>A::class.members.joinToString()<!>
const val aConstructors = <!EVALUATED: `fun <init>(kotlin.Int, kotlin.String): test.A`!>A::class.constructors.joinToString()<!>
const val aVisibility = <!EVALUATED: `PUBLIC`!>A::class.visibility.toString()<!>
const val aSupertypes = <!EVALUATED: `kotlin.Any`!>A::class.supertypes.joinToString()<!>
@CompileTimeCalculation
interface Base<T>
@@ -31,14 +31,14 @@ class B<T, E : T, D : Any>(val prop: T) : Base<T> {
fun <E : Number> withTypeParameter(num: E) = num.toString()
}
const val bMembers = B::class.members.<!EVALUATED: `val test.B<T, E, D>.prop: T, fun test.B<T, E, D>.get(): T, fun test.B<T, E, D>.getThis(): test.B<T, out E, in D>, fun test.B<T, E, D>.withTypeParameter(E): kotlin.String, fun test.B<T, E, D>.equals(kotlin.Any?): kotlin.Boolean, fun test.B<T, E, D>.hashCode(): kotlin.Int, fun test.B<T, E, D>.toString(): kotlin.String`!>joinToString()<!>
const val bTypeParameters = B::class.typeParameters.<!EVALUATED: `T, E, D`!>joinToString()<!>
const val bSupertypes = B::class.supertypes.<!EVALUATED: `test.Base<T>, kotlin.Any`!>joinToString()<!>
const val bReturnType1 = B::class.members.toList()[1].returnType.<!EVALUATED: `T`!>toString()<!>
const val bReturnType2 = B::class.members.toList()[3].returnType.<!EVALUATED: `kotlin.String`!>toString()<!>
const val bMembers = <!EVALUATED: `val test.B<T, E, D>.prop: T, fun test.B<T, E, D>.get(): T, fun test.B<T, E, D>.getThis(): test.B<T, out E, in D>, fun test.B<T, E, D>.withTypeParameter(E): kotlin.String, fun test.B<T, E, D>.equals(kotlin.Any?): kotlin.Boolean, fun test.B<T, E, D>.hashCode(): kotlin.Int, fun test.B<T, E, D>.toString(): kotlin.String`!>B::class.members.joinToString()<!>
const val bTypeParameters = <!EVALUATED: `T, E, D`!>B::class.typeParameters.joinToString()<!>
const val bSupertypes = <!EVALUATED: `test.Base<T>, kotlin.Any`!>B::class.supertypes.joinToString()<!>
const val bReturnType1 = <!EVALUATED: `T`!>B::class.members.toList()[1].returnType.toString()<!>
const val bReturnType2 = <!EVALUATED: `kotlin.String`!>B::class.members.toList()[3].returnType.toString()<!>
const val arguments1 = (B<Number, Double, Int>(1)::getThis as KFunction<*>).returnType.arguments.<!EVALUATED: `T, out E, in D`!>joinToString()<!>
const val arguments2 = (arrayOf(1)::iterator as KFunction<*>).returnType.arguments.<!EVALUATED: `T`!>joinToString()<!>
const val arguments1 = <!EVALUATED: `T, out E, in D`!>(B<Number, Double, Int>(1)::getThis as KFunction<*>).returnType.arguments.joinToString()<!>
const val arguments2 = <!EVALUATED: `T`!>(arrayOf(1)::iterator as KFunction<*>).returnType.arguments.joinToString()<!>
@CompileTimeCalculation
class C {
@@ -46,5 +46,5 @@ class C {
get() = this.length
}
const val cMember = C::class.members.toList()[0].<!EVALUATED: `val test.C.(kotlin.String.)getLength: kotlin.Int`!>toString()<!>
const val cMemberReturnType = C::class.members.toList()[0].returnType.classifier.<!EVALUATED: `class kotlin.Int`!>toString()<!>
const val cMember = <!EVALUATED: `val test.C.(kotlin.String.)getLength: kotlin.Int`!>C::class.members.toList()[0].toString()<!>
const val cMemberReturnType = <!EVALUATED: `class kotlin.Int`!>C::class.members.toList()[0].returnType.classifier.toString()<!>
+4 -4
View File
@@ -17,10 +17,10 @@ const val floatMinExponent = <!EVALUATED: `-126`!>{ java.lang.Float.MIN_EXPONENT
const val floatNegInfinity = <!EVALUATED: `-Infinity`!>{ java.lang.Float.NEGATIVE_INFINITY }()<!>
const val floatPosInfinity = <!EVALUATED: `Infinity`!>{ java.lang.Float.POSITIVE_INFINITY }()<!>
const val booleanFalse = { java.lang.Boolean.FALSE }().<!EVALUATED: `false`!>toString()<!>
const val booleanTrue = { java.lang.Boolean.TRUE }().<!EVALUATED: `true`!>toString()<!>
const val booleanFalse = <!EVALUATED: `false`!>{ java.lang.Boolean.FALSE }().toString()<!>
const val booleanTrue = <!EVALUATED: `true`!>{ java.lang.Boolean.TRUE }().toString()<!>
const val charMax = { java.lang.Character.MAX_VALUE }().<!EVALUATED: `65535`!>toInt()<!>
const val charMin = { java.lang.Character.MIN_VALUE }().<!EVALUATED: `0`!>toInt()<!>
const val charMax = <!EVALUATED: `65535`!>{ java.lang.Character.MAX_VALUE }().toInt()<!>
const val charMin = <!EVALUATED: `0`!>{ java.lang.Character.MIN_VALUE }().toInt()<!>
const val charSize = <!EVALUATED: `16`!>{ java.lang.Character.SIZE }()<!>
const val charBytes = <!EVALUATED: `2`!>{ java.lang.Character.BYTES }()<!>
+1 -1
View File
@@ -8,4 +8,4 @@ class A(val a: Int) {
get() = this.length * a
}
const val kproperty2Get = A::class.members.toList()[1].call(A(2), "123").<!EVALUATED: `6`!>toString()<!>
const val kproperty2Get = <!EVALUATED: `6`!>A::class.members.toList()[1].call(A(2), "123").toString()<!>
+6 -6
View File
@@ -14,9 +14,9 @@ class A {
fun String.get(a: Int) = this
}
const val parameters1 = (::withParameters as KFunction<*>).parameters.<!EVALUATED: `parameter #0 a of fun withParameters(kotlin.Int, kotlin.Double): kotlin.Int, parameter #1 b of fun withParameters(kotlin.Int, kotlin.Double): kotlin.Int`!>joinToString()<!>
const val parameters2 = (String::withExtension as KFunction<*>).parameters.<!EVALUATED: `extension receiver parameter of fun kotlin.String.withExtension(kotlin.Int): kotlin.Int, parameter #1 a of fun kotlin.String.withExtension(kotlin.Int): kotlin.Int`!>joinToString()<!>
const val parameters3 = A::class.members.toList()[0].parameters.<!EVALUATED: `instance parameter of fun test.A.(kotlin.String.)get(kotlin.Int): kotlin.String, extension receiver parameter of fun test.A.(kotlin.String.)get(kotlin.Int): kotlin.String, parameter #2 a of fun test.A.(kotlin.String.)get(kotlin.Int): kotlin.String`!>joinToString()<!>
const val parameters1 = <!EVALUATED: `parameter #0 a of fun withParameters(kotlin.Int, kotlin.Double): kotlin.Int, parameter #1 b of fun withParameters(kotlin.Int, kotlin.Double): kotlin.Int`!>(::withParameters as KFunction<*>).parameters.joinToString()<!>
const val parameters2 = <!EVALUATED: `extension receiver parameter of fun kotlin.String.withExtension(kotlin.Int): kotlin.Int, parameter #1 a of fun kotlin.String.withExtension(kotlin.Int): kotlin.Int`!>(String::withExtension as KFunction<*>).parameters.joinToString()<!>
const val parameters3 = <!EVALUATED: `instance parameter of fun test.A.(kotlin.String.)get(kotlin.Int): kotlin.String, extension receiver parameter of fun test.A.(kotlin.String.)get(kotlin.Int): kotlin.String, parameter #2 a of fun test.A.(kotlin.String.)get(kotlin.Int): kotlin.String`!>A::class.members.toList()[0].parameters.joinToString()<!>
// properties
@CompileTimeCalculation
@@ -25,6 +25,6 @@ class B(val b: Int) {
get() = this.length
}
const val property0Parameters = B(1)::b.parameters.<!EVALUATED: `[]`!>toString()<!>
const val property1Parameters = B::b.parameters.<!EVALUATED: `[instance parameter of val test.B.b: kotlin.Int]`!>toString()<!>
const val property2Parameters = B::class.members.toList()[1].parameters.<!EVALUATED: `[instance parameter of val test.B.(kotlin.String.)size: kotlin.Int, extension receiver parameter of val test.B.(kotlin.String.)size: kotlin.Int]`!>toString()<!>
const val property0Parameters = <!EVALUATED: `[]`!>B(1)::b.parameters.toString()<!>
const val property1Parameters = <!EVALUATED: `[instance parameter of val test.B.b: kotlin.Int]`!>B::b.parameters.toString()<!>
const val property2Parameters = <!EVALUATED: `[instance parameter of val test.B.(kotlin.String.)size: kotlin.Int, extension receiver parameter of val test.B.(kotlin.String.)size: kotlin.Int]`!>B::class.members.toList()[1].parameters.toString()<!>