JVM_IR KT-43877 fix generic signatures for SAM-converted lambdas
This commit is contained in:
Generated
+10
@@ -12178,6 +12178,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samConversionToGenericInterfaceInGenericFun.kt")
|
||||||
|
public void testSamConversionToGenericInterfaceInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/funInterface/samConversionToGenericInterfaceInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
||||||
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
||||||
@@ -15922,6 +15927,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectInsideElvis.kt")
|
@TestMetadata("anonymousObjectInsideElvis.kt")
|
||||||
public void testAnonymousObjectInsideElvis() throws Exception {
|
public void testAnonymousObjectInsideElvis() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
||||||
|
|||||||
+36
-5
@@ -159,8 +159,8 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext)
|
|||||||
private val adaptedReferenceOriginalTarget: IrFunction? = adapteeCall?.symbol?.owner
|
private val adaptedReferenceOriginalTarget: IrFunction? = adapteeCall?.symbol?.owner
|
||||||
private val isAdaptedReference = adaptedReferenceOriginalTarget != null
|
private val isAdaptedReference = adaptedReferenceOriginalTarget != null
|
||||||
|
|
||||||
private val isKotlinFunInterface =
|
private val samInterface = samSuperType?.getClass()
|
||||||
samSuperType != null && samSuperType.getClass()?.origin != IrDeclarationOrigin.IR_EXTERNAL_JAVA_DECLARATION_STUB
|
private val isKotlinFunInterface = samInterface != null && !samInterface.isFromJava()
|
||||||
|
|
||||||
private val needToGenerateSamEqualsHashCodeMethods =
|
private val needToGenerateSamEqualsHashCodeMethods =
|
||||||
isKotlinFunInterface && (isAdaptedReference || !isLambda)
|
isKotlinFunInterface && (isAdaptedReference || !isLambda)
|
||||||
@@ -196,6 +196,14 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext)
|
|||||||
context.ir.symbols.functionAdapter.defaultType
|
context.ir.symbols.functionAdapter.defaultType
|
||||||
else null,
|
else null,
|
||||||
)
|
)
|
||||||
|
if (samInterface != null && origin == JvmLoweredDeclarationOrigin.LAMBDA_IMPL) {
|
||||||
|
// Old back-end generates formal type parameters as in SAM supertype.
|
||||||
|
// Here we create formal type parameters with same names and equivalent upper bounds.
|
||||||
|
// We don't really perform any type substitutions within class body
|
||||||
|
// (it's all fine as soon as we have required generic signatures and don't fail anywhere).
|
||||||
|
// NB this would no longer matter if we generate SAM wrapper classes as synthetic.
|
||||||
|
typeParameters = createFakeFormalTypeParameters(samInterface.typeParameters, this)
|
||||||
|
}
|
||||||
createImplicitParameterDeclarationWithWrappedDescriptor()
|
createImplicitParameterDeclarationWithWrappedDescriptor()
|
||||||
copyAttributes(irFunctionReference)
|
copyAttributes(irFunctionReference)
|
||||||
if (isLambda) {
|
if (isLambda) {
|
||||||
@@ -203,6 +211,24 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun createFakeFormalTypeParameters(sourceTypeParameters: List<IrTypeParameter>, irClass: IrClass): List<IrTypeParameter> {
|
||||||
|
if (sourceTypeParameters.isEmpty()) return emptyList()
|
||||||
|
|
||||||
|
val fakeTypeParameters = sourceTypeParameters.map {
|
||||||
|
buildTypeParameter(irClass) {
|
||||||
|
updateFrom(it)
|
||||||
|
name = it.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val typeRemapper = IrTypeParameterRemapper(sourceTypeParameters.associateWith { fakeTypeParameters[it.index] })
|
||||||
|
for (fakeTypeParameter in fakeTypeParameters) {
|
||||||
|
val sourceTypeParameter = sourceTypeParameters[fakeTypeParameter.index]
|
||||||
|
fakeTypeParameter.superTypes = sourceTypeParameter.superTypes.map { typeRemapper.remapType(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
return fakeTypeParameters
|
||||||
|
}
|
||||||
|
|
||||||
private val receiverField = context.ir.symbols.functionReferenceReceiverField.owner
|
private val receiverField = context.ir.symbols.functionReferenceReceiverField.owner
|
||||||
|
|
||||||
fun build(): IrExpression = context.createJvmIrBuilder(currentScope!!.scope.scopeOwnerSymbol).run {
|
fun build(): IrExpression = context.createJvmIrBuilder(currentScope!!.scope.scopeOwnerSymbol).run {
|
||||||
@@ -390,7 +416,11 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext)
|
|||||||
isSuspend = callee.isSuspend
|
isSuspend = callee.isSuspend
|
||||||
}.apply {
|
}.apply {
|
||||||
overriddenSymbols += superMethod
|
overriddenSymbols += superMethod
|
||||||
dispatchReceiverParameter = parentAsClass.thisReceiver!!.copyTo(this)
|
dispatchReceiverParameter = buildReceiverParameter(
|
||||||
|
this,
|
||||||
|
IrDeclarationOrigin.INSTANCE_RECEIVER,
|
||||||
|
functionReferenceClass.symbol.defaultType
|
||||||
|
)
|
||||||
if (isLambda) createLambdaInvokeMethod() else createFunctionReferenceInvokeMethod(receiverVar)
|
if (isLambda) createLambdaInvokeMethod() else createFunctionReferenceInvokeMethod(receiverVar)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,8 +457,9 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext)
|
|||||||
// will put it into a field.
|
// will put it into a field.
|
||||||
if (samSuperType == null)
|
if (samSuperType == null)
|
||||||
irImplicitCast(
|
irImplicitCast(
|
||||||
irGetField(irGet(dispatchReceiverParameter!!),
|
irGetField(
|
||||||
this@FunctionReferenceBuilder.receiverField
|
irGet(dispatchReceiverParameter!!),
|
||||||
|
this@FunctionReferenceBuilder.receiverField
|
||||||
),
|
),
|
||||||
boundReceiver.second.type
|
boundReceiver.second.type
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1075,11 +1075,13 @@ private fun makeKotlinType(
|
|||||||
classDescriptor.defaultType.replace(newArguments = kotlinTypeArguments).makeNullableAsSpecified(hasQuestionMark)
|
classDescriptor.defaultType.replace(newArguments = kotlinTypeArguments).makeNullableAsSpecified(hasQuestionMark)
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
throw RuntimeException(
|
throw RuntimeException(
|
||||||
"Classifier: $classDescriptor\n" +
|
"Classifier: ${classifier.owner.render()}\n" +
|
||||||
"Type parameters:\n" +
|
"Type parameters:\n" +
|
||||||
classDescriptor.defaultType.constructor.parameters.withIndex()
|
classDescriptor.defaultType.constructor.parameters.withIndex()
|
||||||
.joinToString(separator = "\n") {
|
.joinToString(separator = "\n") {
|
||||||
"${it.index}: ${(it.value as IrBasedTypeParameterDescriptor).owner.render()}"
|
val irTypeParameter = (it.value as IrBasedTypeParameterDescriptor).owner
|
||||||
|
"${it.index}: ${irTypeParameter.render()} " +
|
||||||
|
"of ${irTypeParameter.parent.render()}"
|
||||||
} +
|
} +
|
||||||
"\nType arguments:\n" +
|
"\nType arguments:\n" +
|
||||||
arguments.withIndex()
|
arguments.withIndex()
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
|||||||
import org.jetbrains.kotlin.ir.types.impl.*
|
import org.jetbrains.kotlin.ir.types.impl.*
|
||||||
import org.jetbrains.kotlin.ir.util.defaultType
|
import org.jetbrains.kotlin.ir.util.defaultType
|
||||||
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
||||||
|
import org.jetbrains.kotlin.ir.util.isAnonymousObject
|
||||||
import org.jetbrains.kotlin.ir.util.isPropertyAccessor
|
import org.jetbrains.kotlin.ir.util.isPropertyAccessor
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
|
import org.jetbrains.kotlin.name.SpecialNames
|
||||||
import org.jetbrains.kotlin.types.*
|
import org.jetbrains.kotlin.types.*
|
||||||
import org.jetbrains.kotlin.types.typeUtil.makeNotNullable
|
import org.jetbrains.kotlin.types.typeUtil.makeNotNullable
|
||||||
import org.jetbrains.kotlin.types.typeUtil.makeNullable
|
import org.jetbrains.kotlin.types.typeUtil.makeNullable
|
||||||
@@ -177,6 +179,10 @@ val IrClass.typeConstructorParameters: Sequence<IrTypeParameter>
|
|||||||
// Ideally this should be fixed in FE.
|
// Ideally this should be fixed in FE.
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
current.isAnonymousObject -> {
|
||||||
|
// Anonymous classes don't capture type parameters.
|
||||||
|
null
|
||||||
|
}
|
||||||
parent is IrClass && current is IrClass && !current.isInner ->
|
parent is IrClass && current is IrClass && !current.isInner ->
|
||||||
null
|
null
|
||||||
else ->
|
else ->
|
||||||
|
|||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
fun interface FunIFace<T, R> {
|
||||||
|
fun call(ic: T): R
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T, R> bar(value: T, f: FunIFace<T, R>): R {
|
||||||
|
return f.call(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
class X(val value: Any)
|
||||||
|
|
||||||
|
fun <T> gfn(a: X): T =
|
||||||
|
bar(a) {
|
||||||
|
it.value as T
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() =
|
||||||
|
gfn<String>(X("OK"))
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fun <T> test(): String {
|
||||||
|
val x = object {
|
||||||
|
fun <S> foo() = "OK"
|
||||||
|
}
|
||||||
|
return x.foo<Any>()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = test<Int>()
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
|
||||||
|
fun <T> test() {
|
||||||
|
val x = object {
|
||||||
|
fun <S1> foo() {}
|
||||||
|
|
||||||
|
fun <S2> S2.ext() {}
|
||||||
|
|
||||||
|
val <S3> S3.extVal
|
||||||
|
get() = 1
|
||||||
|
|
||||||
|
var <S4> S4.extVar
|
||||||
|
get() = 1
|
||||||
|
set(value) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
x.foo<Any>()
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> AnonymousObjectInGenericFunKt$test$x$1 {
|
||||||
|
// source: 'anonymousObjectInGenericFun.kt'
|
||||||
|
public final <<S1:Ljava/lang/Object;>()V> method foo(): void
|
||||||
|
public final <<S2:Ljava/lang/Object;>(TS2;)V> method ext(p0: java.lang.Object): void
|
||||||
|
public final <<S3:Ljava/lang/Object;>(TS3;)I> method getExtVal(p0: java.lang.Object): int
|
||||||
|
public final <<S4:Ljava/lang/Object;>(TS4;)I> method getExtVar(p0: java.lang.Object): int
|
||||||
|
public final <<S4:Ljava/lang/Object;>(TS4;I)V> method setExtVar(p0: java.lang.Object, p1: int): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
enclosing method AnonymousObjectInGenericFunKt.test()V
|
||||||
|
inner (anonymous) class AnonymousObjectInGenericFunKt$test$x$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> AnonymousObjectInGenericFunKt {
|
||||||
|
// source: 'anonymousObjectInGenericFun.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>()V> method test(): void
|
||||||
|
inner (anonymous) class AnonymousObjectInGenericFunKt$test$x$1
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun interface Sam<T> {
|
||||||
|
fun get(): T
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> expectsSam(sam: Sam<T>) = sam.get()
|
||||||
|
|
||||||
|
fun <T> foo(): T = null!!
|
||||||
|
|
||||||
|
fun <T> genericSam(): T = expectsSam(::foo)
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class<Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function0<TT;>;> TKt$genericSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method invoke(): java.lang.Object
|
||||||
|
static <null> method <clinit>(): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
enclosing method TKt.genericSam()Ljava/lang/Object;
|
||||||
|
public final static field <null> INSTANCE: TKt$genericSam$1
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> TKt$sam$Sam$0 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public <null> method equals(p0: java.lang.Object): boolean
|
||||||
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
|
public <null> method getFunctionDelegate(): kotlin.Function
|
||||||
|
public <null> method hashCode(): int
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>()TT;> method foo(): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>()TT;> method genericSam(): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class<Ljava/lang/Object;LSam<TT;>;Lkotlin/jvm/internal/FunctionAdapter;> TKt$genericSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final @org.jetbrains.annotations.NotNull <()Lkotlin/Function<*>;> method getFunctionDelegate(): kotlin.Function
|
||||||
|
public final <()TT;> method get(): java.lang.Object
|
||||||
|
static <null> method <clinit>(): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
public final <null> method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||||
|
public final <null> method hashCode(): int
|
||||||
|
enclosing method TKt.genericSam()Ljava/lang/Object;
|
||||||
|
public final static field <null> INSTANCE: TKt$genericSam$1
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>()TT;> method foo(): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>()TT;> method genericSam(): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun <T> foo(): T = null!!
|
||||||
|
|
||||||
|
fun <T> genericSam(): T = J.g(::foo)
|
||||||
|
|
||||||
|
// FILE: J.java
|
||||||
|
public class J {
|
||||||
|
static <T> T g(Sam<T> s) {
|
||||||
|
return s.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Sam.java
|
||||||
|
public interface Sam<T> {
|
||||||
|
T get();
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class<Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function0<TT;>;> TKt$genericSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method invoke(): java.lang.Object
|
||||||
|
static <null> method <clinit>(): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
enclosing method TKt.genericSam()Ljava/lang/Object;
|
||||||
|
public final static field <null> INSTANCE: TKt$genericSam$1
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> TKt$sam$Sam$0 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>()TT;> method foo(): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>()TT;> method genericSam(): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class<Ljava/lang/Object;LSam<TT;>;> TKt$genericSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method get(): java.lang.Object
|
||||||
|
static <null> method <clinit>(): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
enclosing method TKt.genericSam()Ljava/lang/Object;
|
||||||
|
public final static field <null> INSTANCE: TKt$genericSam$1
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>()TT;> method foo(): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>()TT;> method genericSam(): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun interface Sam<T> {
|
||||||
|
fun get(): T
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> expectsSam(sam: Sam<T>) = sam.get()
|
||||||
|
|
||||||
|
fun foo(): String = ""
|
||||||
|
|
||||||
|
fun specializedSam(): String = expectsSam(::foo)
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> TKt$sam$Sam$0 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public <null> method equals(p0: java.lang.Object): boolean
|
||||||
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
|
public <null> method getFunctionDelegate(): kotlin.Function
|
||||||
|
public <null> method hashCode(): int
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class<Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;> TKt$specializedSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
static <null> method <clinit>(): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
public synthetic bridge <null> method invoke(): java.lang.Object
|
||||||
|
public final @org.jetbrains.annotations.NotNull <null> method invoke(): java.lang.String
|
||||||
|
enclosing method TKt.specializedSam()Ljava/lang/String;
|
||||||
|
public final static field <null> INSTANCE: TKt$specializedSam$1
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <null> method foo(): java.lang.String
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <null> method specializedSam(): java.lang.String
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class<Ljava/lang/Object;LSam<Ljava/lang/String;>;Lkotlin/jvm/internal/FunctionAdapter;> TKt$specializedSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final @org.jetbrains.annotations.NotNull <()Lkotlin/Function<*>;> method getFunctionDelegate(): kotlin.Function
|
||||||
|
static <null> method <clinit>(): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
public final <null> method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||||
|
public synthetic bridge <null> method get(): java.lang.Object
|
||||||
|
public final @org.jetbrains.annotations.NotNull <null> method get(): java.lang.String
|
||||||
|
public final <null> method hashCode(): int
|
||||||
|
enclosing method TKt.specializedSam()Ljava/lang/String;
|
||||||
|
public final static field <null> INSTANCE: TKt$specializedSam$1
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <null> method foo(): java.lang.String
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <null> method specializedSam(): java.lang.String
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun foo(): String = ""
|
||||||
|
|
||||||
|
fun specializedSam(): String = J.g(::foo)
|
||||||
|
|
||||||
|
// FILE: J.java
|
||||||
|
public class J {
|
||||||
|
static <T> T g(Sam<T> s) {
|
||||||
|
return s.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Sam.java
|
||||||
|
public interface Sam<T> {
|
||||||
|
T get();
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> TKt$sam$Sam$0 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class<Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;> TKt$specializedSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
static <null> method <clinit>(): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
public synthetic bridge <null> method invoke(): java.lang.Object
|
||||||
|
public final @org.jetbrains.annotations.NotNull <null> method invoke(): java.lang.String
|
||||||
|
enclosing method TKt.specializedSam()Ljava/lang/String;
|
||||||
|
public final static field <null> INSTANCE: TKt$specializedSam$1
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <null> method foo(): java.lang.String
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <null> method specializedSam(): java.lang.String
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class<Ljava/lang/Object;LSam<Ljava/lang/String;>;> TKt$specializedSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
static <null> method <clinit>(): void
|
||||||
|
<null> method <init>(): void
|
||||||
|
public synthetic bridge <null> method get(): java.lang.Object
|
||||||
|
public final @org.jetbrains.annotations.NotNull <null> method get(): java.lang.String
|
||||||
|
enclosing method TKt.specializedSam()Ljava/lang/String;
|
||||||
|
public final static field <null> INSTANCE: TKt$specializedSam$1
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <null> method foo(): java.lang.String
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <null> method specializedSam(): java.lang.String
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun interface Sam<T> {
|
||||||
|
fun get(): T
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> expectsSam(sam: Sam<T>) = sam.get()
|
||||||
|
|
||||||
|
fun <T> genericSam(f: () -> T): T = expectsSam(f)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> TKt$sam$Sam$0 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public <null> method equals(p0: java.lang.Object): boolean
|
||||||
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
|
public <null> method getFunctionDelegate(): kotlin.Function
|
||||||
|
public <null> method hashCode(): int
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> TKt$sam$Sam$0 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final @org.jetbrains.annotations.NotNull <()Lkotlin/Function<*>;> method getFunctionDelegate(): kotlin.Function
|
||||||
|
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public final <null> method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||||
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
|
public final <null> method hashCode(): int
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
final inner class TKt$sam$Sam$0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||||
|
final inner class TKt$sam$Sam$0
|
||||||
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// WITH_SIGNATURES
|
// WITH_SIGNATURES
|
||||||
// FILE: samGenericSuperinterface.kt
|
// FILE: t.kt
|
||||||
|
|
||||||
fun <T> genericSam(f: () -> T): T = J.g(f)
|
fun <T> genericSam(f: () -> T): T = J.g(f)
|
||||||
|
|
||||||
+4
-4
@@ -1,13 +1,13 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
final class<null> SamGenericSuperinterfaceKt$sam$Sam$0 {
|
final class<null> TKt$sam$Sam$0 {
|
||||||
// source: 'samGenericSuperinterface.kt'
|
// source: 't.kt'
|
||||||
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
public synthetic final <null> method get(): java.lang.Object
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class<null> SamGenericSuperinterfaceKt {
|
public final class<null> TKt {
|
||||||
// source: 'samGenericSuperinterface.kt'
|
// source: 't.kt'
|
||||||
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||||
}
|
}
|
||||||
+6
-6
@@ -1,15 +1,15 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
final class<null> SamGenericSuperinterfaceKt$sam$Sam$0 {
|
final class<null> TKt$sam$Sam$0 {
|
||||||
// source: 'samGenericSuperinterface.kt'
|
// source: 't.kt'
|
||||||
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||||
public synthetic final <null> method get(): java.lang.Object
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
final inner class SamGenericSuperinterfaceKt$sam$Sam$0
|
final inner class TKt$sam$Sam$0
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class<null> SamGenericSuperinterfaceKt {
|
public final class<null> TKt {
|
||||||
// source: 'samGenericSuperinterface.kt'
|
// source: 't.kt'
|
||||||
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||||
final inner class SamGenericSuperinterfaceKt$sam$Sam$0
|
final inner class TKt$sam$Sam$0
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun interface Sam<T> {
|
||||||
|
fun get(): T
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> expectsSam(sam: Sam<T>) = sam.get()
|
||||||
|
|
||||||
|
fun <T> genericSamGet(f: () -> T): T = expectsSam({ f() })
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<TT;>;> TKt$genericSamGet$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method get(): java.lang.Object
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
enclosing method TKt.genericSamGet(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
|
||||||
|
synthetic final field <null> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$genericSamGet$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSamGet(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$genericSamGet$1
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<TT;>;> TKt$genericSamGet$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method get(): java.lang.Object
|
||||||
|
<(Lkotlin/jvm/functions/Function0<+TT;>;)V> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
enclosing method TKt.genericSamGet(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
|
||||||
|
synthetic final field <Lkotlin/jvm/functions/Function0<TT;>;> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$genericSamGet$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSamGet(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$genericSamGet$1
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun <T> genericSam(f: () -> T): Sam<T> = J.sam({ f() })
|
||||||
|
|
||||||
|
fun <T> genericSamGet(f: () -> T): T = J.get({ f() })
|
||||||
|
|
||||||
|
// FILE: J.java
|
||||||
|
public class J {
|
||||||
|
static <T> T get(Sam<T> s) {
|
||||||
|
return s.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
static <T> Sam<T> sam(Sam<T> s) {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Sam.java
|
||||||
|
public interface Sam<T> {
|
||||||
|
T get();
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<TT;>;> TKt$genericSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method get(): java.lang.Object
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
enclosing method TKt.genericSam(Lkotlin/jvm/functions/Function0;)LSam;
|
||||||
|
synthetic final field <null> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<TT;>;> TKt$genericSamGet$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method get(): java.lang.Object
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
enclosing method TKt.genericSamGet(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
|
||||||
|
synthetic final field <null> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$genericSamGet$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)LSam<TT;>;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): Sam
|
||||||
|
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSamGet(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
inner (anonymous) class TKt$genericSamGet$1
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<TT;>;> TKt$genericSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method get(): java.lang.Object
|
||||||
|
<(Lkotlin/jvm/functions/Function0<+TT;>;)V> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
enclosing method TKt.genericSam(Lkotlin/jvm/functions/Function0;)LSam;
|
||||||
|
synthetic final field <Lkotlin/jvm/functions/Function0<TT;>;> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<TT;>;> TKt$genericSamGet$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final <()TT;> method get(): java.lang.Object
|
||||||
|
<(Lkotlin/jvm/functions/Function0<+TT;>;)V> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
enclosing method TKt.genericSamGet(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
|
||||||
|
synthetic final field <Lkotlin/jvm/functions/Function0<TT;>;> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$genericSamGet$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)LSam<TT;>;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): Sam
|
||||||
|
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSamGet(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$genericSam$1
|
||||||
|
inner (anonymous) class TKt$genericSamGet$1
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun interface Sam<T> {
|
||||||
|
fun get(): T
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> expectsSam(sam: Sam<T>) = sam.get()
|
||||||
|
|
||||||
|
fun specializedSam(f: () -> String) = expectsSam({ f() })
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<Ljava/lang/String;>;> TKt$specializedSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public synthetic bridge <null> method get(): java.lang.Object
|
||||||
|
public final @org.jetbrains.annotations.NotNull <null> method get(): java.lang.String
|
||||||
|
enclosing method TKt.specializedSam(Lkotlin/jvm/functions/Function0;)Ljava/lang/String;
|
||||||
|
synthetic final field <null> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<Ljava/lang/String;>;> TKt$specializedSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)V> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public synthetic bridge <null> method get(): java.lang.Object
|
||||||
|
public final @org.jetbrains.annotations.NotNull <null> method get(): java.lang.String
|
||||||
|
enclosing method TKt.specializedSam(Lkotlin/jvm/functions/Function0;)Ljava/lang/String;
|
||||||
|
synthetic final field <Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun specializedSam(f: () -> String) = J.g({ f() })
|
||||||
|
|
||||||
|
// FILE: J.java
|
||||||
|
public class J {
|
||||||
|
static <T> T g(Sam<T> s) {
|
||||||
|
return s.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Sam.java
|
||||||
|
public interface Sam<T> {
|
||||||
|
T get();
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<Ljava/lang/String;>;> TKt$specializedSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public synthetic bridge <null> method get(): java.lang.Object
|
||||||
|
public final <null> method get(): java.lang.String
|
||||||
|
enclosing method TKt.specializedSam(Lkotlin/jvm/functions/Function0;)Ljava/lang/String;
|
||||||
|
synthetic final field <null> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
final class<<T:Ljava/lang/Object;>Ljava/lang/Object;LSam<Ljava/lang/String;>;> TKt$specializedSam$1 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)V> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public synthetic bridge <null> method get(): java.lang.Object
|
||||||
|
public final <null> method get(): java.lang.String
|
||||||
|
enclosing method TKt.specializedSam(Lkotlin/jvm/functions/Function0;)Ljava/lang/String;
|
||||||
|
synthetic final field <Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;> $f: kotlin.jvm.functions.Function0
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||||
|
inner (anonymous) class TKt$specializedSam$1
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// WITH_SIGNATURES
|
||||||
|
// FILE: t.kt
|
||||||
|
|
||||||
|
fun interface Sam<T> {
|
||||||
|
fun get(): T
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> expectsSam(sam: Sam<T>) = sam.get()
|
||||||
|
|
||||||
|
fun specializedSam(f: () -> String) = expectsSam(f)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> TKt$sam$Sam$0 {
|
||||||
|
// source: 't.kt'
|
||||||
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public <null> method equals(p0: java.lang.Object): boolean
|
||||||
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
|
public <null> method getFunctionDelegate(): kotlin.Function
|
||||||
|
public <null> method hashCode(): int
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||||
|
// source: 't.kt'
|
||||||
|
public abstract <()TT;> method get(): java.lang.Object
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> TKt$sam$Sam$0 {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final @org.jetbrains.annotations.NotNull <()Lkotlin/Function<*>;> method getFunctionDelegate(): kotlin.Function
|
||||||
|
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public final <null> method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||||
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
|
public final <null> method hashCode(): int
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
final inner class TKt$sam$Sam$0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> TKt {
|
||||||
|
// source: 't.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||||
|
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
|
||||||
|
final inner class TKt$sam$Sam$0
|
||||||
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// WITH_SIGNATURES
|
// WITH_SIGNATURES
|
||||||
// FILE: samGenericSuperinterface.kt
|
// FILE: t.kt
|
||||||
|
|
||||||
fun specializedSam(f: () -> String) = J.g(f)
|
fun specializedSam(f: () -> String) = J.g(f)
|
||||||
|
|
||||||
+4
-4
@@ -1,13 +1,13 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
final class<null> SamGenericSuperinterfaceKt$sam$Sam$0 {
|
final class<null> TKt$sam$Sam$0 {
|
||||||
// source: 'samGenericSuperinterface.kt'
|
// source: 't.kt'
|
||||||
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
public synthetic final <null> method get(): java.lang.Object
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class<null> SamGenericSuperinterfaceKt {
|
public final class<null> TKt {
|
||||||
// source: 'samGenericSuperinterface.kt'
|
// source: 't.kt'
|
||||||
public final static <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
public final static <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||||
}
|
}
|
||||||
+6
-6
@@ -1,15 +1,15 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
final class<null> SamGenericSuperinterfaceKt$sam$Sam$0 {
|
final class<null> TKt$sam$Sam$0 {
|
||||||
// source: 'samGenericSuperinterface.kt'
|
// source: 't.kt'
|
||||||
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||||
public synthetic final <null> method get(): java.lang.Object
|
public synthetic final <null> method get(): java.lang.Object
|
||||||
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
final inner class SamGenericSuperinterfaceKt$sam$Sam$0
|
final inner class TKt$sam$Sam$0
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class<null> SamGenericSuperinterfaceKt {
|
public final class<null> TKt {
|
||||||
// source: 'samGenericSuperinterface.kt'
|
// source: 't.kt'
|
||||||
public final static <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
public final static <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||||
final inner class SamGenericSuperinterfaceKt$sam$Sam$0
|
final inner class TKt$sam$Sam$0
|
||||||
}
|
}
|
||||||
+10
@@ -12178,6 +12178,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samConversionToGenericInterfaceInGenericFun.kt")
|
||||||
|
public void testSamConversionToGenericInterfaceInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/funInterface/samConversionToGenericInterfaceInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
||||||
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
||||||
@@ -15922,6 +15927,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectInsideElvis.kt")
|
@TestMetadata("anonymousObjectInsideElvis.kt")
|
||||||
public void testAnonymousObjectInsideElvis() throws Exception {
|
public void testAnonymousObjectInsideElvis() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
||||||
|
|||||||
+83
-15
@@ -39,6 +39,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("callableNameIntrinsic.kt")
|
@TestMetadata("callableNameIntrinsic.kt")
|
||||||
public void testCallableNameIntrinsic() throws Exception {
|
public void testCallableNameIntrinsic() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt");
|
||||||
@@ -209,21 +214,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeListing/rawTypeInSignature.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/rawTypeInSignature.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samAdapterAndInlinedOne.kt")
|
|
||||||
public void testSamAdapterAndInlinedOne() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samGenericSuperinterface.kt")
|
|
||||||
public void testSamGenericSuperinterface() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/samGenericSuperinterface.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samSpecializedGenericSuperinterface.kt")
|
|
||||||
public void testSamSpecializedGenericSuperinterface() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/samSpecializedGenericSuperinterface.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("varargsBridge.kt")
|
@TestMetadata("varargsBridge.kt")
|
||||||
public void testVarargsBridge() throws Exception {
|
public void testVarargsBridge() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/varargsBridge.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/varargsBridge.kt");
|
||||||
@@ -1495,6 +1485,84 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/bytecodeListing/sam")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Sam extends AbstractBytecodeListingTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInSam() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callableRefGenericFunInterface.kt")
|
||||||
|
public void testCallableRefGenericFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/callableRefGenericFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callableRefGenericSamInterface.kt")
|
||||||
|
public void testCallableRefGenericSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/callableRefGenericSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callableRefSpecializedFunInterface.kt")
|
||||||
|
public void testCallableRefSpecializedFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callableRefSpecializedSamInterface.kt")
|
||||||
|
public void testCallableRefSpecializedSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("genericFunInterface.kt")
|
||||||
|
public void testGenericFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/genericFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("genericSamInterface.kt")
|
||||||
|
public void testGenericSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/genericSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaGenericFunInterface.kt")
|
||||||
|
public void testLambdaGenericFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaGenericFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaGenericSamInterface.kt")
|
||||||
|
public void testLambdaGenericSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaGenericSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaSpecializedFunInterface.kt")
|
||||||
|
public void testLambdaSpecializedFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaSpecializedFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaSpecializedSamInterface.kt")
|
||||||
|
public void testLambdaSpecializedSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaSpecializedSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samAdapterAndInlinedOne.kt")
|
||||||
|
public void testSamAdapterAndInlinedOne() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/samAdapterAndInlinedOne.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("specializedFunInterface.kt")
|
||||||
|
public void testSpecializedFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/specializedFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("specializedSamInterface.kt")
|
||||||
|
public void testSpecializedSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")
|
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+10
@@ -12178,6 +12178,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samConversionToGenericInterfaceInGenericFun.kt")
|
||||||
|
public void testSamConversionToGenericInterfaceInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/funInterface/samConversionToGenericInterfaceInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
||||||
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
||||||
@@ -15922,6 +15927,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectInsideElvis.kt")
|
@TestMetadata("anonymousObjectInsideElvis.kt")
|
||||||
public void testAnonymousObjectInsideElvis() throws Exception {
|
public void testAnonymousObjectInsideElvis() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
||||||
|
|||||||
+10
@@ -12178,6 +12178,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samConversionToGenericInterfaceInGenericFun.kt")
|
||||||
|
public void testSamConversionToGenericInterfaceInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/funInterface/samConversionToGenericInterfaceInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
||||||
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
||||||
@@ -15922,6 +15927,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectInsideElvis.kt")
|
@TestMetadata("anonymousObjectInsideElvis.kt")
|
||||||
public void testAnonymousObjectInsideElvis() throws Exception {
|
public void testAnonymousObjectInsideElvis() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
||||||
|
|||||||
+83
-15
@@ -39,6 +39,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("callableNameIntrinsic.kt")
|
@TestMetadata("callableNameIntrinsic.kt")
|
||||||
public void testCallableNameIntrinsic() throws Exception {
|
public void testCallableNameIntrinsic() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt");
|
||||||
@@ -209,21 +214,6 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
|||||||
runTest("compiler/testData/codegen/bytecodeListing/rawTypeInSignature.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/rawTypeInSignature.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samAdapterAndInlinedOne.kt")
|
|
||||||
public void testSamAdapterAndInlinedOne() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samGenericSuperinterface.kt")
|
|
||||||
public void testSamGenericSuperinterface() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/samGenericSuperinterface.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samSpecializedGenericSuperinterface.kt")
|
|
||||||
public void testSamSpecializedGenericSuperinterface() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/samSpecializedGenericSuperinterface.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("varargsBridge.kt")
|
@TestMetadata("varargsBridge.kt")
|
||||||
public void testVarargsBridge() throws Exception {
|
public void testVarargsBridge() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/varargsBridge.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/varargsBridge.kt");
|
||||||
@@ -1495,6 +1485,84 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/bytecodeListing/sam")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Sam extends AbstractIrBytecodeListingTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInSam() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callableRefGenericFunInterface.kt")
|
||||||
|
public void testCallableRefGenericFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/callableRefGenericFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callableRefGenericSamInterface.kt")
|
||||||
|
public void testCallableRefGenericSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/callableRefGenericSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callableRefSpecializedFunInterface.kt")
|
||||||
|
public void testCallableRefSpecializedFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callableRefSpecializedSamInterface.kt")
|
||||||
|
public void testCallableRefSpecializedSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("genericFunInterface.kt")
|
||||||
|
public void testGenericFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/genericFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("genericSamInterface.kt")
|
||||||
|
public void testGenericSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/genericSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaGenericFunInterface.kt")
|
||||||
|
public void testLambdaGenericFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaGenericFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaGenericSamInterface.kt")
|
||||||
|
public void testLambdaGenericSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaGenericSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaSpecializedFunInterface.kt")
|
||||||
|
public void testLambdaSpecializedFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaSpecializedFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaSpecializedSamInterface.kt")
|
||||||
|
public void testLambdaSpecializedSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaSpecializedSamInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samAdapterAndInlinedOne.kt")
|
||||||
|
public void testSamAdapterAndInlinedOne() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/samAdapterAndInlinedOne.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("specializedFunInterface.kt")
|
||||||
|
public void testSpecializedFunInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/specializedFunInterface.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("specializedSamInterface.kt")
|
||||||
|
public void testSpecializedSamInterface() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")
|
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+10
@@ -10408,6 +10408,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
|||||||
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samConversionToGenericInterfaceInGenericFun.kt")
|
||||||
|
public void testSamConversionToGenericInterfaceInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/funInterface/samConversionToGenericInterfaceInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
||||||
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
||||||
@@ -13752,6 +13757,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
|||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectInsideElvis.kt")
|
@TestMetadata("anonymousObjectInsideElvis.kt")
|
||||||
public void testAnonymousObjectInsideElvis() throws Exception {
|
public void testAnonymousObjectInsideElvis() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
||||||
|
|||||||
Generated
+10
@@ -10408,6 +10408,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samConversionToGenericInterfaceInGenericFun.kt")
|
||||||
|
public void testSamConversionToGenericInterfaceInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/funInterface/samConversionToGenericInterfaceInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
||||||
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
||||||
@@ -13752,6 +13757,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectInsideElvis.kt")
|
@TestMetadata("anonymousObjectInsideElvis.kt")
|
||||||
public void testAnonymousObjectInsideElvis() throws Exception {
|
public void testAnonymousObjectInsideElvis() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
||||||
|
|||||||
Generated
+10
@@ -10408,6 +10408,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samConversionToGenericInterfaceInGenericFun.kt")
|
||||||
|
public void testSamConversionToGenericInterfaceInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/funInterface/samConversionToGenericInterfaceInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
@TestMetadata("subtypeOfFunctionalTypeToFunInterfaceConversion.kt")
|
||||||
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
public void testSubtypeOfFunctionalTypeToFunInterfaceConversion() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
runTest("compiler/testData/codegen/box/funInterface/subtypeOfFunctionalTypeToFunInterfaceConversion.kt");
|
||||||
@@ -13817,6 +13822,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInForLoopIteratorAndBody.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectInsideElvis.kt")
|
@TestMetadata("anonymousObjectInsideElvis.kt")
|
||||||
public void testAnonymousObjectInsideElvis() throws Exception {
|
public void testAnonymousObjectInsideElvis() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
||||||
|
|||||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+10
@@ -5259,6 +5259,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
runTest("compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samConversionToGenericInterfaceInGenericFun.kt")
|
||||||
|
public void testSamConversionToGenericInterfaceInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/funInterface/samConversionToGenericInterfaceInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/funInterface/equality")
|
@TestMetadata("compiler/testData/codegen/box/funInterface/equality")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
@@ -8043,6 +8048,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectInGenericFun.kt")
|
||||||
|
public void testAnonymousObjectInGenericFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInGenericFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectInsideElvis.kt")
|
@TestMetadata("anonymousObjectInsideElvis.kt")
|
||||||
public void testAnonymousObjectInsideElvis() throws Exception {
|
public void testAnonymousObjectInsideElvis() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
runTest("compiler/testData/codegen/box/ir/anonymousObjectInsideElvis.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user