JVM_IR indy-SAM: KT-45069 box lambda 'Unit' return type if needed
This commit is contained in:
+78
@@ -20021,6 +20021,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/genericFunInterfaceWithPrimitive.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intReturnTypeAsNumber.kt")
|
||||
public void testIntReturnTypeAsNumber() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/intReturnTypeAsNumber.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullabilityAssertions.kt")
|
||||
public void testNullabilityAssertions() throws Exception {
|
||||
@@ -20220,6 +20226,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/innerConstructorRef.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intReturnTypeAsNumber.kt")
|
||||
public void testIntReturnTypeAsNumber() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/intReturnTypeAsNumber.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localFunction1.kt")
|
||||
public void testLocalFunction1() throws Exception {
|
||||
@@ -20244,11 +20256,41 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nonTrivialReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsObject.kt")
|
||||
public void testNothingReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nothingReturnTypeAsObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsString.kt")
|
||||
public void testNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableNothingReturnTypeAsObject.kt")
|
||||
public void testNullableNothingReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nullableNothingReturnTypeAsObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableNothingReturnTypeAsString.kt")
|
||||
public void testNullableNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nullableNothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("voidReturnTypeAsObject.kt")
|
||||
public void testVoidReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/voidReturnTypeAsObject.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -20354,6 +20396,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/covariantOverrideWithNNothing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericWithInProjection.kt")
|
||||
public void testGenericWithInProjection() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/genericWithInProjection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericWithStarProjection.kt")
|
||||
public void testGenericWithStarProjection() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/genericWithStarProjection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedWithChar.kt")
|
||||
public void testInheritedWithChar() throws Exception {
|
||||
@@ -20414,6 +20468,30 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/mixPrimitiveAndBoxed.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsGeneric.kt")
|
||||
public void testNothingReturnTypeAsGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/nothingReturnTypeAsGeneric.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsString.kt")
|
||||
public void testNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/nothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specializedWithChar.kt")
|
||||
public void testSpecializedWithChar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/specializedWithChar.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specializedWithCharClass.kt")
|
||||
public void testSpecializedWithCharClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/specializedWithCharClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("voidReturnTypeAsGeneric.kt")
|
||||
public void testVoidReturnTypeAsGeneric() throws Exception {
|
||||
|
||||
+5
-1
@@ -241,6 +241,8 @@ internal class LambdaMetafactoryArgumentsBuilder(
|
||||
}
|
||||
if (!checkTypeCompliesWithConstraint(implFun.returnType, constraints.returnType))
|
||||
return false
|
||||
if (implFun.returnType.isUnit() && !fakeInstanceMethod.returnType.isUnit())
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -278,7 +280,9 @@ internal class LambdaMetafactoryArgumentsBuilder(
|
||||
implParameter.type = implParameter.type.makeNullable()
|
||||
}
|
||||
}
|
||||
if (constraints.returnType.requiresImplLambdaBoxing()) {
|
||||
if (constraints.returnType.requiresImplLambdaBoxing() ||
|
||||
implFun.returnType.isUnit() && !fakeInstanceMethod.returnType.isUnit()
|
||||
) {
|
||||
implFun.returnType = implFun.returnType.makeNullable()
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// FILE: intReturnTypeAsNumber.kt
|
||||
|
||||
fun box(): String {
|
||||
val num = Sam { 42 }
|
||||
if (num.get() != 42)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: Sam.java
|
||||
public interface Sam {
|
||||
Number get();
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// FILE: nothingReturnTypeAsObject.kt
|
||||
|
||||
fun interface IFoo<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
fun thr(s: String): Nothing = throw RuntimeException(s)
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
Sam(::thr).get("OK")
|
||||
} catch (e: RuntimeException) {
|
||||
return e.message!!
|
||||
}
|
||||
return "Failed"
|
||||
}
|
||||
|
||||
|
||||
// FILE: Sam.java
|
||||
public interface Sam {
|
||||
Object get(String s);
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// FILE: nothingReturnTypeAsString.kt
|
||||
|
||||
fun interface IFoo<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
fun thr(s: String): Nothing = throw RuntimeException(s)
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
Sam(::thr).get("OK")
|
||||
} catch (e: RuntimeException) {
|
||||
return e.message!!
|
||||
}
|
||||
return "Failed"
|
||||
}
|
||||
|
||||
|
||||
// FILE: Sam.java
|
||||
public interface Sam {
|
||||
String get(String s);
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// FILE: nullableNothingReturnTypeAsObject.kt
|
||||
|
||||
fun interface IFoo<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
var t = "Failed"
|
||||
|
||||
fun test(s: String): Nothing? {
|
||||
t = s
|
||||
return null
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val q = Sam(::test).get("OK")
|
||||
if (q != null)
|
||||
return "Failed: $q"
|
||||
return t
|
||||
}
|
||||
|
||||
|
||||
// FILE: Sam.java
|
||||
public interface Sam {
|
||||
Object get(String s);
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// FILE: nullableNothingReturnTypeAsString.kt
|
||||
|
||||
fun interface IFoo<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
var t = "Failed"
|
||||
|
||||
fun test(s: String): Nothing? {
|
||||
t = s
|
||||
return null
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val q = Sam(::test).get("OK")
|
||||
if (q != null)
|
||||
return "Failed: $q"
|
||||
return t
|
||||
}
|
||||
|
||||
|
||||
// FILE: Sam.java
|
||||
public interface Sam {
|
||||
String get(String s);
|
||||
}
|
||||
compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/voidReturnTypeAsObject.kt
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// FILE: voidReturnTypeAsObject.kt
|
||||
var t = "Failed"
|
||||
|
||||
fun ok(s: String) { t = s }
|
||||
|
||||
fun box(): String {
|
||||
val r = Sam(::ok).get("OK")
|
||||
if (r != Unit) {
|
||||
return "Failed: $r"
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
||||
// FILE: Sam.java
|
||||
public interface Sam {
|
||||
Object get(String s);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
|
||||
fun interface INum {
|
||||
fun get(): Number
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val num = INum { 42 }
|
||||
if (num.get() != 42)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
|
||||
fun interface Cmp<T> {
|
||||
fun compare(a: T, b: T): Int
|
||||
}
|
||||
|
||||
fun <T> foo(comparator: Cmp<in T>, a: T, b: T) = comparator.compare(a, b)
|
||||
|
||||
fun bar(x: Int, y: Int) = foo({ a, b -> a - b}, x, y)
|
||||
|
||||
fun box(): String {
|
||||
val t = bar(42, 117)
|
||||
if (t != -75)
|
||||
return "Failed: t=$t"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
fun interface Cmp<T> {
|
||||
fun compare(a: T, b: T): Int
|
||||
}
|
||||
|
||||
fun cmp(c: Cmp<*>) = c
|
||||
|
||||
fun box(): String {
|
||||
val c = cmp { _, _ -> 0 } as Cmp<Any>
|
||||
if (c.compare(1, 2) != 0)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// IGNORE_DEXING
|
||||
|
||||
fun interface GenericToAny<T> {
|
||||
fun invoke(x: T): Any
|
||||
@@ -12,4 +11,4 @@ fun interface GenericCharToAny : GenericToAny<Char>
|
||||
fun withK(fn: GenericCharToAny) = fn.invoke('K').toString()
|
||||
|
||||
fun box(): String =
|
||||
withK { "O" + it }
|
||||
withK { "O" + it }
|
||||
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
|
||||
fun interface IFoo<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
fun <T> foo(iFoo: IFoo<T>) = iFoo.foo()
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
foo { throw RuntimeException("OK") }
|
||||
} catch (e: RuntimeException) {
|
||||
return e.message!!
|
||||
}
|
||||
return "Failed"
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
|
||||
fun interface IFoo {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
fun foo(iFoo: IFoo) = iFoo.foo()
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
foo { throw RuntimeException("OK") }
|
||||
} catch (e: RuntimeException) {
|
||||
return e.message!!
|
||||
}
|
||||
return "Failed"
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
|
||||
fun interface GenericToAny<T> {
|
||||
fun invoke(Inner: T): Any
|
||||
}
|
||||
|
||||
fun <T> foo2(t: T, g: GenericToAny<T>): Any = g.invoke(t)
|
||||
|
||||
fun box(): String {
|
||||
foo2<Char>('.') { }
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: CLASS
|
||||
|
||||
fun interface GenericToAny<T> {
|
||||
fun invoke(Inner: T): Any
|
||||
}
|
||||
|
||||
fun <T> foo2(t: T, g: GenericToAny<T>): Any = g.invoke(t)
|
||||
|
||||
fun box(): String {
|
||||
foo2<Char>('.') { }
|
||||
return "OK"
|
||||
}
|
||||
+78
@@ -20021,6 +20021,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/genericFunInterfaceWithPrimitive.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intReturnTypeAsNumber.kt")
|
||||
public void testIntReturnTypeAsNumber() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/intReturnTypeAsNumber.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullabilityAssertions.kt")
|
||||
public void testNullabilityAssertions() throws Exception {
|
||||
@@ -20220,6 +20226,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/innerConstructorRef.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intReturnTypeAsNumber.kt")
|
||||
public void testIntReturnTypeAsNumber() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/intReturnTypeAsNumber.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localFunction1.kt")
|
||||
public void testLocalFunction1() throws Exception {
|
||||
@@ -20244,11 +20256,41 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nonTrivialReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsObject.kt")
|
||||
public void testNothingReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nothingReturnTypeAsObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsString.kt")
|
||||
public void testNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableNothingReturnTypeAsObject.kt")
|
||||
public void testNullableNothingReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nullableNothingReturnTypeAsObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableNothingReturnTypeAsString.kt")
|
||||
public void testNullableNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nullableNothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("voidReturnTypeAsObject.kt")
|
||||
public void testVoidReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/voidReturnTypeAsObject.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -20354,6 +20396,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/covariantOverrideWithNNothing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericWithInProjection.kt")
|
||||
public void testGenericWithInProjection() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/genericWithInProjection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericWithStarProjection.kt")
|
||||
public void testGenericWithStarProjection() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/genericWithStarProjection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedWithChar.kt")
|
||||
public void testInheritedWithChar() throws Exception {
|
||||
@@ -20414,6 +20468,30 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/mixPrimitiveAndBoxed.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsGeneric.kt")
|
||||
public void testNothingReturnTypeAsGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/nothingReturnTypeAsGeneric.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsString.kt")
|
||||
public void testNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/nothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specializedWithChar.kt")
|
||||
public void testSpecializedWithChar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/specializedWithChar.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specializedWithCharClass.kt")
|
||||
public void testSpecializedWithCharClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/specializedWithCharClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("voidReturnTypeAsGeneric.kt")
|
||||
public void testVoidReturnTypeAsGeneric() throws Exception {
|
||||
|
||||
+78
@@ -20021,6 +20021,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/genericFunInterfaceWithPrimitive.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intReturnTypeAsNumber.kt")
|
||||
public void testIntReturnTypeAsNumber() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/intReturnTypeAsNumber.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullabilityAssertions.kt")
|
||||
public void testNullabilityAssertions() throws Exception {
|
||||
@@ -20220,6 +20226,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/innerConstructorRef.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intReturnTypeAsNumber.kt")
|
||||
public void testIntReturnTypeAsNumber() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/intReturnTypeAsNumber.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localFunction1.kt")
|
||||
public void testLocalFunction1() throws Exception {
|
||||
@@ -20244,11 +20256,41 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nonTrivialReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsObject.kt")
|
||||
public void testNothingReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nothingReturnTypeAsObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsString.kt")
|
||||
public void testNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableNothingReturnTypeAsObject.kt")
|
||||
public void testNullableNothingReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nullableNothingReturnTypeAsObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableNothingReturnTypeAsString.kt")
|
||||
public void testNullableNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nullableNothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("voidReturnTypeAsObject.kt")
|
||||
public void testVoidReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/voidReturnTypeAsObject.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -20354,6 +20396,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/covariantOverrideWithNNothing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericWithInProjection.kt")
|
||||
public void testGenericWithInProjection() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/genericWithInProjection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericWithStarProjection.kt")
|
||||
public void testGenericWithStarProjection() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/genericWithStarProjection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedWithChar.kt")
|
||||
public void testInheritedWithChar() throws Exception {
|
||||
@@ -20414,6 +20468,30 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/mixPrimitiveAndBoxed.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsGeneric.kt")
|
||||
public void testNothingReturnTypeAsGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/nothingReturnTypeAsGeneric.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nothingReturnTypeAsString.kt")
|
||||
public void testNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/nothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specializedWithChar.kt")
|
||||
public void testSpecializedWithChar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/specializedWithChar.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specializedWithCharClass.kt")
|
||||
public void testSpecializedWithCharClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/specializedWithCharClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("voidReturnTypeAsGeneric.kt")
|
||||
public void testVoidReturnTypeAsGeneric() throws Exception {
|
||||
|
||||
+65
@@ -16791,6 +16791,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/genericFunInterfaceWithPrimitive.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intReturnTypeAsNumber.kt")
|
||||
public void testIntReturnTypeAsNumber() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/intReturnTypeAsNumber.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullabilityAssertions.kt")
|
||||
public void testNullabilityAssertions() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/nullabilityAssertions.kt");
|
||||
@@ -16961,6 +16966,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/innerConstructorRef.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intReturnTypeAsNumber.kt")
|
||||
public void testIntReturnTypeAsNumber() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/intReturnTypeAsNumber.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunction1.kt")
|
||||
public void testLocalFunction1() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/localFunction1.kt");
|
||||
@@ -16981,10 +16991,35 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nonTrivialReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothingReturnTypeAsObject.kt")
|
||||
public void testNothingReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nothingReturnTypeAsObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothingReturnTypeAsString.kt")
|
||||
public void testNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableNothingReturnTypeAsObject.kt")
|
||||
public void testNullableNothingReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nullableNothingReturnTypeAsObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableNothingReturnTypeAsString.kt")
|
||||
public void testNullableNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/nullableNothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/simple.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("voidReturnTypeAsObject.kt")
|
||||
public void testVoidReturnTypeAsObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/voidReturnTypeAsObject.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature")
|
||||
@@ -17087,6 +17122,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/covariantOverrideWithNNothing.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericWithInProjection.kt")
|
||||
public void testGenericWithInProjection() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/genericWithInProjection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericWithStarProjection.kt")
|
||||
public void testGenericWithStarProjection() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/genericWithStarProjection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inheritedWithChar.kt")
|
||||
public void testInheritedWithChar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/inheritedWithChar.kt");
|
||||
@@ -17132,6 +17177,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/mixGenericArrayAndArrayOfString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothingReturnTypeAsGeneric.kt")
|
||||
public void testNothingReturnTypeAsGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/nothingReturnTypeAsGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothingReturnTypeAsString.kt")
|
||||
public void testNothingReturnTypeAsString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/nothingReturnTypeAsString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specializedWithChar.kt")
|
||||
public void testSpecializedWithChar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/specializedWithChar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specializedWithCharClass.kt")
|
||||
public void testSpecializedWithCharClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/specializedWithCharClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("voidReturnTypeAsGeneric.kt")
|
||||
public void testVoidReturnTypeAsGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/voidReturnTypeAsGeneric.kt");
|
||||
|
||||
Reference in New Issue
Block a user