[Commonizer] Tests on rewriting callables names to succeed commonization
^KT-34602
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
// this is to avoid missing Kotlin/Native stdlib
|
||||
package kotlinx.cinterop
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class ObjCMethod() // fake annotation class without properties
|
||||
Vendored
+111
@@ -0,0 +1,111 @@
|
||||
fun functionNoParameters() {}
|
||||
fun functionSingleParameter(i: Int) {}
|
||||
fun functionTwoParameters(i: Int, s: String) {}
|
||||
fun functionThreeParameters(i: Int, s: String, l: List<Double>) {}
|
||||
|
||||
fun functionMismatchedParameterNames1(i: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames2(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames3(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames4(i: Int, s: String) {}
|
||||
|
||||
fun functionMismatchedParameterNames5(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames6(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames7(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames8(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames9(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames10(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames11(i: Int, s: String, l: List<Double>) {}
|
||||
|
||||
fun functionMismatchedParameterNames12(vararg v: Int) {}
|
||||
fun functionMismatchedParameterNames13(i: Int, vararg v: Int) {}
|
||||
fun functionMismatchedParameterNames14(i: Int, vararg v: Int) {}
|
||||
fun functionMismatchedParameterNames15(i: Int, vararg v: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames16(i: Int) {}
|
||||
fun functionMismatchedParameterNames17(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames18(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames19(vararg v: Int) {}
|
||||
fun functionMismatchedParameterNames20(i: Int, vararg v: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames21(arg0: Int) {}
|
||||
fun functionMismatchedParameterNames22(arg0: Int, arg1: String) {}
|
||||
fun functionMismatchedParameterNames23(arg0: Int, arg1: String, arg2: List<Double>) {}
|
||||
fun functionMismatchedParameterNames24(vararg variadicArguments: Int) {}
|
||||
fun functionMismatchedParameterNames25(arg0: Int, vararg variadicArguments: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames26(arg0: Int) {}
|
||||
fun functionMismatchedParameterNames27(arg0: Int, arg1: String) {}
|
||||
fun functionMismatchedParameterNames28(arg0: Int, arg1: String, arg2: List<Double>) {}
|
||||
fun functionMismatchedParameterNames29(vararg variadicArguments: Int) {}
|
||||
fun functionMismatchedParameterNames30(arg0: Int, vararg variadicArguments: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames31(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames32(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames33(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames34(i: Int, s: String) {}
|
||||
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames35(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames36(arg0: Int, arg1: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames37(arg0: Int, arg1: String) {}
|
||||
|
||||
// hasStableParameterNames=false
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames38(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames39(i: Int, s: String) {}
|
||||
// hasStableParameterNames=false
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames40(i: Int, s: String) {}
|
||||
|
||||
// hasStableParameterNames=false
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames41(arg0: Int, arg1: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames42(arg0: Int, arg1: String) {}
|
||||
// hasStableParameterNames=false
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames43(arg0: Int, arg1: String) {}
|
||||
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun overloadedFunctionByParameterNames(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun overloadedFunctionByParameterNames(xi: Int, xs: String) {}
|
||||
|
||||
fun functionMismatchedParameterCount1(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterCount2(i: Int, s: String, l: List<Double>) {}
|
||||
|
||||
fun functionMismatchedParameterTypes1(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterTypes2(i: Int, s: String) {}
|
||||
|
||||
fun functionDefaultValues1(i: Int = 1, s: String) {}
|
||||
fun functionDefaultValues2(i: Int, s: String = "hello") {}
|
||||
|
||||
inline fun inlineFunction1(lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction2(lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction3(crossinline lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction4(lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction5(noinline lazyMessage: () -> String) {}
|
||||
|
||||
fun functionWithVararg1(vararg numbers: Int) {}
|
||||
fun functionWithVararg2(vararg numbers: Int) {}
|
||||
fun functionWithVararg3(vararg numbers: Int) {}
|
||||
fun functionWithVararg4(numbers: Array<Int>) {}
|
||||
fun functionWithVararg5(numbers: Array<out Int>) {}
|
||||
fun functionWithVararg6(vararg names: String) {}
|
||||
fun functionWithVararg7(vararg names: String) {}
|
||||
fun functionWithVararg8(vararg names: String) {}
|
||||
fun functionWithVararg9(names: Array<String>) {}
|
||||
fun functionWithVararg10(names: Array<out String>) {}
|
||||
|
||||
fun <T> functionWithTypeParameters1(p1: T, p2: String) {}
|
||||
fun <T> functionWithTypeParameters2(p1: T, p2: String) {}
|
||||
fun <T> functionWithTypeParameters3(p1: T, p2: String) {}
|
||||
fun <Q, R> functionWithTypeParameters4(p1: Q, p2: R) {}
|
||||
fun <Q, R> functionWithTypeParameters5(p1: Q, p2: R) {}
|
||||
fun <Q, R> functionWithTypeParameters6(p1: Q, p2: R) {}
|
||||
Vendored
-40
@@ -1,40 +0,0 @@
|
||||
fun functionNoParameters() {}
|
||||
fun functionSingleParameter(i: Int) {}
|
||||
fun functionTwoParameters(i: Int, s: String) {}
|
||||
fun functionThreeParameters(i: Int, s: String, l: List<Double>) {}
|
||||
|
||||
fun functionMismatchedParameterCount1(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterCount2(i: Int, s: String, l: List<Double>) {}
|
||||
|
||||
fun functionMismatchedParameterNames1(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames2(i: Int, s: String) {}
|
||||
|
||||
fun functionMismatchedParameterTypes1(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterTypes2(i: Int, s: String) {}
|
||||
|
||||
fun functionDefaultValues1(i: Int = 1, s: String) {}
|
||||
fun functionDefaultValues2(i: Int, s: String = "hello") {}
|
||||
|
||||
inline fun inlineFunction1(lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction2(lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction3(crossinline lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction4(lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction5(noinline lazyMessage: () -> String) {}
|
||||
|
||||
fun functionWithVararg1(vararg numbers: Int) {}
|
||||
fun functionWithVararg2(vararg numbers: Int) {}
|
||||
fun functionWithVararg3(vararg numbers: Int) {}
|
||||
fun functionWithVararg4(numbers: Array<Int>) {}
|
||||
fun functionWithVararg5(numbers: Array<out Int>) {}
|
||||
fun functionWithVararg6(vararg names: String) {}
|
||||
fun functionWithVararg7(vararg names: String) {}
|
||||
fun functionWithVararg8(vararg names: String) {}
|
||||
fun functionWithVararg9(names: Array<String>) {}
|
||||
fun functionWithVararg10(names: Array<out String>) {}
|
||||
|
||||
fun <T> functionWithTypeParameters1(p1: T, p2: String) {}
|
||||
fun <T> functionWithTypeParameters2(p1: T, p2: String) {}
|
||||
fun <T> functionWithTypeParameters3(p1: T, p2: String) {}
|
||||
fun <Q, R> functionWithTypeParameters4(p1: Q, p2: R) {}
|
||||
fun <Q, R> functionWithTypeParameters5(p1: Q, p2: R) {}
|
||||
fun <Q, R> functionWithTypeParameters6(p1: Q, p2: R) {}
|
||||
Vendored
-40
@@ -1,40 +0,0 @@
|
||||
fun functionNoParameters() {}
|
||||
fun functionSingleParameter(i: Int) {}
|
||||
fun functionTwoParameters(i: Int, s: String) {}
|
||||
fun functionThreeParameters(i: Int, s: String, l: List<Double>) {}
|
||||
|
||||
fun functionMismatchedParameterCount1(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterCount2(i: Int, s: String) {}
|
||||
|
||||
fun functionMismatchedParameterNames1(i1: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames2(i: Int, s1: String) {}
|
||||
|
||||
fun functionMismatchedParameterTypes1(i: Short, s: String) {}
|
||||
fun functionMismatchedParameterTypes2(i: Int, s: CharSequence) {}
|
||||
|
||||
fun functionDefaultValues1(i: Int = 1, s: String) {}
|
||||
fun functionDefaultValues2(i: Int, s: String = "hello") {}
|
||||
|
||||
inline fun inlineFunction1(lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction2(crossinline lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction3(crossinline lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction4(noinline lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction5(noinline lazyMessage: () -> String) {}
|
||||
|
||||
fun functionWithVararg1(vararg numbers: Int) {}
|
||||
fun functionWithVararg2(numbers: Array<Int>) {}
|
||||
fun functionWithVararg3(numbers: Array<out Int>) {}
|
||||
fun functionWithVararg4(numbers: Array<out Int>) {}
|
||||
fun functionWithVararg5(numbers: Array<out Int>) {}
|
||||
fun functionWithVararg6(vararg names: String) {}
|
||||
fun functionWithVararg7(names: Array<String>) {}
|
||||
fun functionWithVararg8(names: Array<out String>) {}
|
||||
fun functionWithVararg9(names: Array<out String>) {}
|
||||
fun functionWithVararg10(names: Array<out String>) {}
|
||||
|
||||
fun <T> functionWithTypeParameters1(p1: T, p2: String) {}
|
||||
fun <T> functionWithTypeParameters2(p1: String, p2: String) {}
|
||||
fun <T> functionWithTypeParameters2(p1: String, p2: T) {}
|
||||
fun <Q, R> functionWithTypeParameters4(p1: Q, p2: R) {}
|
||||
fun <R, Q> functionWithTypeParameters5(p1: Q, p2: R) {}
|
||||
fun <Q, R> functionWithTypeParameters6(p1: R, p2: Q) {}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// this is to avoid missing Kotlin/Native stdlib
|
||||
package kotlinx.cinterop
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class ObjCMethod() // fake annotation class without properties
|
||||
Vendored
+111
@@ -0,0 +1,111 @@
|
||||
fun functionNoParameters() {}
|
||||
fun functionSingleParameter(i: Int) {}
|
||||
fun functionTwoParameters(i: Int, s: String) {}
|
||||
fun functionThreeParameters(i: Int, s: String, l: List<Double>) {}
|
||||
|
||||
fun functionMismatchedParameterNames1(xi: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames2(xi: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames3(i: Int, xs: String) {}
|
||||
fun functionMismatchedParameterNames4(xi: Int, xs: String) {}
|
||||
|
||||
fun functionMismatchedParameterNames5(xi: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames6(i: Int, xs: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames7(i: Int, s: String, xl: List<Double>) {}
|
||||
fun functionMismatchedParameterNames8(xi: Int, xs: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames9(xi: Int, s: String, xl: List<Double>) {}
|
||||
fun functionMismatchedParameterNames10(i: Int, xs: String, xl: List<Double>) {}
|
||||
fun functionMismatchedParameterNames11(xi: Int, xs: String, xl: List<Double>) {}
|
||||
|
||||
fun functionMismatchedParameterNames12(vararg xv: Int) {}
|
||||
fun functionMismatchedParameterNames13(xi: Int, vararg v: Int) {}
|
||||
fun functionMismatchedParameterNames14(i: Int, vararg xv: Int) {}
|
||||
fun functionMismatchedParameterNames15(xi: Int, vararg xv: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames16(arg0: Int) {}
|
||||
fun functionMismatchedParameterNames17(arg0: Int, arg1: String) {}
|
||||
fun functionMismatchedParameterNames18(arg0: Int, arg1: String, arg2: List<Double>) {}
|
||||
fun functionMismatchedParameterNames19(vararg variadicArguments: Int) {}
|
||||
fun functionMismatchedParameterNames20(arg0: Int, vararg variadicArguments: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames21(i: Int) {}
|
||||
fun functionMismatchedParameterNames22(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames23(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterNames24(vararg v: Int) {}
|
||||
fun functionMismatchedParameterNames25(i: Int, vararg v: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames26(arg0: Int) {}
|
||||
fun functionMismatchedParameterNames27(arg0: Int, arg1: String) {}
|
||||
fun functionMismatchedParameterNames28(arg0: Int, arg1: String, arg2: List<Double>) {}
|
||||
fun functionMismatchedParameterNames29(vararg variadicArguments: Int) {}
|
||||
fun functionMismatchedParameterNames30(arg0: Int, vararg variadicArguments: Int) {}
|
||||
|
||||
fun functionMismatchedParameterNames31(i: Int, s: String) {}
|
||||
fun functionMismatchedParameterNames32(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames33(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames34(i: Int, s: String) {}
|
||||
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames35(arg0: Int, arg1: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames36(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames37(arg0: Int, arg1: String) {}
|
||||
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames38(i: Int, s: String) {}
|
||||
// hasStableParameterNames=false
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames39(i: Int, s: String) {}
|
||||
// hasStableParameterNames=false
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames40(i: Int, s: String) {}
|
||||
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames41(arg0: Int, arg1: String) {}
|
||||
// hasStableParameterNames=false
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames42(arg0: Int, arg1: String) {}
|
||||
// hasStableParameterNames=false
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun functionMismatchedParameterNames43(arg0: Int, arg1: String) {}
|
||||
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun overloadedFunctionByParameterNames(i: Int, s: String) {}
|
||||
@kotlinx.cinterop.ObjCMethod
|
||||
fun overloadedFunctionByParameterNames(xi: Int, xs: String) {}
|
||||
|
||||
fun functionMismatchedParameterCount1(i: Int, s: String, l: List<Double>) {}
|
||||
fun functionMismatchedParameterCount2(i: Int, s: String) {}
|
||||
|
||||
fun functionMismatchedParameterTypes1(i: Short, s: String) {}
|
||||
fun functionMismatchedParameterTypes2(i: Int, s: CharSequence) {}
|
||||
|
||||
fun functionDefaultValues1(i: Int = 1, s: String) {}
|
||||
fun functionDefaultValues2(i: Int, s: String = "hello") {}
|
||||
|
||||
inline fun inlineFunction1(lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction2(crossinline lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction3(crossinline lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction4(noinline lazyMessage: () -> String) {}
|
||||
inline fun inlineFunction5(noinline lazyMessage: () -> String) {}
|
||||
|
||||
fun functionWithVararg1(vararg numbers: Int) {}
|
||||
fun functionWithVararg2(numbers: Array<Int>) {}
|
||||
fun functionWithVararg3(numbers: Array<out Int>) {}
|
||||
fun functionWithVararg4(numbers: Array<out Int>) {}
|
||||
fun functionWithVararg5(numbers: Array<out Int>) {}
|
||||
fun functionWithVararg6(vararg names: String) {}
|
||||
fun functionWithVararg7(names: Array<String>) {}
|
||||
fun functionWithVararg8(names: Array<out String>) {}
|
||||
fun functionWithVararg9(names: Array<out String>) {}
|
||||
fun functionWithVararg10(names: Array<out String>) {}
|
||||
|
||||
fun <T> functionWithTypeParameters1(p1: T, p2: String) {}
|
||||
fun <T> functionWithTypeParameters2(p1: String, p2: String) {}
|
||||
fun <T> functionWithTypeParameters2(p1: String, p2: T) {}
|
||||
fun <Q, R> functionWithTypeParameters4(p1: Q, p2: R) {}
|
||||
fun <R, Q> functionWithTypeParameters5(p1: Q, p2: R) {}
|
||||
fun <Q, R> functionWithTypeParameters6(p1: R, p2: Q) {}
|
||||
Reference in New Issue
Block a user