Unbox inline class parameter of lambda if underlying type is Any or Any?

The inline class is boxed when we pass it as lambda argument, now we
unbox it. If the underlying type is not Any or Any?, bridge method does
the unboxing.

 #KT-32450 Fixed
 #KT-39923 Fixed
 #KT-32228 Fixed
 #KT-40282 Fixed
This commit is contained in:
Ilmir Usmanov
2020-10-20 19:38:06 +02:00
parent 752f6d8f72
commit a775fa195b
59 changed files with 4371 additions and 0 deletions
@@ -31,6 +31,7 @@ import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader;
import org.jetbrains.kotlin.metadata.ProtoBuf;
import org.jetbrains.kotlin.psi.KtElement;
import org.jetbrains.kotlin.resolve.DescriptorUtils;
import org.jetbrains.kotlin.resolve.InlineClassesUtilsKt;
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall;
import org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt;
import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOriginKt;
@@ -367,6 +368,11 @@ public class ClosureCodegen extends MemberCodegen<KtElement> {
value = StackValue.local(slot, type, bridgeParameterKotlinTypes.get(i));
slot += type.getSize();
}
if (InlineClassesCodegenUtilKt.isInlineClassWithUnderlyingTypeAnyOrAnyN(parameterType) &&
functionReferenceCall == null
) {
parameterType = InlineClassesUtilsKt.unsubstitutedUnderlyingParameter(parameterType).getType();
}
value.put(typeMapper.mapType(calleeParameter), parameterType, iv);
}
@@ -1995,6 +1995,21 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
StackValue localOrCaptured = findLocalOrCapturedValue(descriptor);
if (localOrCaptured != null) {
if (descriptor instanceof ValueParameterDescriptor) {
KotlinType inlineClassType = ((ValueParameterDescriptor) descriptor).getType();
if (InlineClassesCodegenUtilKt.isInlineClassWithUnderlyingTypeAnyOrAnyN(inlineClassType) &&
InlineClassesCodegenUtilKt.isGenericParameter((CallableDescriptor) descriptor) &&
// TODO: HACK around bridgeGenerationCrossinline
!(context instanceof InlineLambdaContext) &&
// Do not unbox parameters of suspend lambda, they are unboxed in `invoke` method
!CoroutineCodegenUtilKt.isInvokeSuspendOfLambda(context.getFunctionDescriptor())
) {
KotlinType underlyingType = InlineClassesUtilsKt.underlyingRepresentation(
(ClassDescriptor) inlineClassType.getConstructor().getDeclarationDescriptor()).getType();
return StackValue.underlyingValueOfInlineClass(
typeMapper.mapType(underlyingType), underlyingType, localOrCaptured);
}
}
return localOrCaptured;
}
throw new UnsupportedOperationException("don't know how to generate reference " + descriptor);
@@ -0,0 +1,29 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.codegen
import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
import org.jetbrains.kotlin.descriptors.impl.AnonymousFunctionDescriptor
import org.jetbrains.kotlin.resolve.isInlineClassType
import org.jetbrains.kotlin.resolve.underlyingRepresentation
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.typeUtil.isAnyOrNullableAny
import org.jetbrains.kotlin.types.typeUtil.isTypeParameter
fun KotlinType.isInlineClassWithUnderlyingTypeAnyOrAnyN(): Boolean {
if (!isInlineClassType()) return false
val classDescriptor = constructor.declarationDescriptor as? ClassDescriptor ?: return false
return classDescriptor.underlyingRepresentation()?.type?.isAnyOrNullableAny() == true
}
fun CallableDescriptor.isGenericParameter(): Boolean {
if (this !is ValueParameterDescriptor) return false
if (containingDeclaration is AnonymousFunctionDescriptor) return true
val index = containingDeclaration.valueParameters.indexOf(this)
return containingDeclaration.overriddenDescriptors.any { it.original.valueParameters[index].type.isTypeParameter() }
}
@@ -15081,6 +15081,163 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractFirBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractFirBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractFirBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractFirBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/box/innerNested")
@@ -1950,6 +1950,148 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractFirBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractFirBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractFirBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractFirBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -0,0 +1,49 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
it.value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
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)
}
inline class IC(val value: Any) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) return "FAIL 1: $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,49 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
it.value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
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)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: Any?) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) "FAIL 1 $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,53 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
(it.value as FooHolder).value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T> IC.extensionValue(): T = (value as FooHolder).value as T
fun <T> normalValue(ic: IC): T = (ic.value as FooHolder).value as T
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)
}
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: Foo): Foo {
fun <T> dispatchValue(): T = (value as FooHolder).value as T
}
fun box(): String {
var res = underlying<Int>(IC(FooHolder(40))) + 2
if (res != 42) return "FAIL 1: $res"
res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,53 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
(it.value as FooHolder).value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T> IC.extensionValue(): T = (value as FooHolder).value as T
fun <T> normalValue(ic: IC): T = (ic.value as FooHolder).value as T
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)
}
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: FooHolder): Foo {
fun <T> dispatchValue(): T = (value as FooHolder).value as T
}
fun box(): String {
var res = underlying<Int>(IC(FooHolder(40))) + 2
if (res != 42) return "FAIL 1: $res"
res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,49 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
it.value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
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)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: Int) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) "FAIL 1: $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,21 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> foo(a: Result<T>): T = bar(a) {
it.getOrThrow()
}
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)
}
fun box(): String {
val res = foo<Int>(Result.success(40)) + 2
return if (res != 42) "FAIL $res" else "OK"
}
@@ -0,0 +1,51 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> underlying(a: IC): T = bar(a) {
it.value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
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)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: String) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 1: $res"
res = extension<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 2: $res"
res = dispatch<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
res = normal<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
return "OK"
}
@@ -0,0 +1,45 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
it.value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
inline class IC(val value: Any) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) return "FAIL 1: $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,45 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
it.value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: Any?) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) "FAIL 1 $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,49 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
(it.value as FooHolder).value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T> IC.extensionValue(): T = (value as FooHolder).value as T
fun <T> normalValue(ic: IC): T = (ic.value as FooHolder).value as T
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: Foo): Foo {
fun <T> dispatchValue(): T = (value as FooHolder).value as T
}
fun box(): String {
var res = underlying<Int>(IC(FooHolder(40))) + 2
if (res != 42) return "FAIL 1: $res"
res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,49 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
(it.value as FooHolder).value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T> IC.extensionValue(): T = (value as FooHolder).value as T
fun <T> normalValue(ic: IC): T = (ic.value as FooHolder).value as T
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: FooHolder): Foo {
fun <T> dispatchValue(): T = (value as FooHolder).value as T
}
fun box(): String {
var res = underlying<Int>(IC(FooHolder(40))) + 2
if (res != 42) return "FAIL 1: $res"
res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,45 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
it.value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: Int) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) "FAIL 1: $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,17 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> foo(a: Result<T>): T = bar(a) {
it.getOrThrow()
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun box(): String {
val res = foo<Int>(Result.success(40)) + 2
return if (res != 42) "FAIL $res" else "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> underlying(a: IC): T = bar(a) {
it.value as T
}
fun <T> extension(a: IC): T = bar(a) {
it.extensionValue()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchValue()
}
fun <T> normal(a: IC): T = bar(a) {
normalValue(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: String) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 1: $res"
res = extension<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 2: $res"
res = dispatch<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
res = normal<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
return "OK"
}
@@ -0,0 +1,49 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.value as T
})
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.extensionValue()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.dispatchValue()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = normalValue(ic)
})
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
inline class IC(val value: Any) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) return "FAIL 1: $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,49 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.value as T
})
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.extensionValue()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.dispatchValue()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = normalValue(ic)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: Any?) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) "FAIL 1 $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,53 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = (ic.value as FooHolder).value as T
})
//fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
// override fun call(ic: IC): T = ic.extensionValue()
//})
//
//fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
// override fun call(ic: IC): T = ic.dispatchValue()
//})
//
//fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
// override fun call(ic: IC): T = normalValue(ic)
//})
//
//fun <T> IC.extensionValue(): T = (value as FooHolder).value as T
//
//fun <T> normalValue(ic: IC): T = (ic.value as FooHolder).value as T
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: Foo): Foo {
// fun <T> dispatchValue(): T = (value as FooHolder).value as T
}
fun box(): String {
var res = underlying<Int>(IC(FooHolder(40))) + 2
if (res != 42) return "FAIL 1: $res"
// res = extension<Int>(IC(FooHolder(40))) + 3
// if (res != 43) return "FAIL 2: $res"
//
// res = dispatch<Int>(IC(FooHolder(40))) + 4
// if (res != 44) return "FAIL 3: $res"
//
// res = normal<Int>(IC(FooHolder(40))) + 5
// if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,53 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = (ic.value as FooHolder).value as T
})
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.extensionValue()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.dispatchValue()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = normalValue(ic)
})
fun <T> IC.extensionValue(): T = (value as FooHolder).value as T
fun <T> normalValue(ic: IC): T = (ic.value as FooHolder).value as T
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: FooHolder): Foo {
fun <T> dispatchValue(): T = (value as FooHolder).value as T
}
fun box(): String {
var res = underlying<Int>(IC(FooHolder(40))) + 2
if (res != 42) return "FAIL 1: $res"
res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,49 @@
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.value as T
})
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.extensionValue()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.dispatchValue()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = normalValue(ic)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: Int) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<Int>(IC(40)) + 2
if (res != 42) "FAIL 1: $res"
res = extension<Int>(IC(40)) + 3
if (res != 43) "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,21 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> foo(a: Result<T>): T = bar(a, object : IFace<Result<T>, T> {
override fun call(ic: Result<T>): T = ic.getOrThrow()
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun box(): String {
val res = foo<Int>(Result.success(40)) + 2
return if (res != 42) "FAIL $res" else "OK"
}
@@ -0,0 +1,51 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> underlying(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.value as T
})
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.extensionValue()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = ic.dispatchValue()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(ic: IC): T = normalValue(ic)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun <T> IC.extensionValue(): T = value as T
fun <T> normalValue(ic: IC): T = ic.value as T
inline class IC(val value: String) {
fun <T> dispatchValue(): T = value as T
}
fun box(): String {
var res = underlying<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 1: $res"
res = extension<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 2: $res"
res = dispatch<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
res = normal<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Any) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
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)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Any?) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
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)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,51 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: Foo): Foo {
inline fun <T> dispatchInline(): T = (value as FooHolder).value as T
}
inline fun <T> IC.extensionInline(): T = (value as FooHolder).value as T
inline fun <T> normalInline(a: IC): T = (a.value as FooHolder).value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
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)
}
fun box(): String {
var res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,51 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: FooHolder): Foo {
inline fun <T> dispatchInline(): T = (value as FooHolder).value as T
}
inline fun <T> IC.extensionInline(): T = (value as FooHolder).value as T
inline fun <T> normalInline(a: IC): T = (a.value as FooHolder).value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
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)
}
fun box(): String {
var res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Int) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
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)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,50 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: inline.kt
inline class IC(val value: String) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
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)
}
fun box(): String {
var res = extension<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 2: $res"
res = dispatch<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
res = normal<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
return "OK"
}
@@ -0,0 +1,43 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Any) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,43 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Any?) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: Foo): Foo {
inline fun <T> dispatchInline(): T = (value as FooHolder).value as T
}
inline fun <T> IC.extensionInline(): T = (value as FooHolder).value as T
inline fun <T> normalInline(a: IC): T = (a.value as FooHolder).value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun box(): String {
var res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: FooHolder): Foo {
inline fun <T> dispatchInline(): T = (value as FooHolder).value as T
}
inline fun <T> IC.extensionInline(): T = (value as FooHolder).value as T
inline fun <T> normalInline(a: IC): T = (a.value as FooHolder).value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun box(): String {
var res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,43 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Int) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,46 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: inline.kt
inline class IC(val value: String) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a) {
it.extensionInline()
}
fun <T> dispatch(a: IC): T = bar(a) {
it.dispatchInline()
}
fun <T> normal(a: IC): T = bar(a) {
normalInline(it)
}
fun <T, R> bar(value: T, f: (T) -> R): R {
return f(value)
}
fun box(): String {
var res = extension<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 2: $res"
res = dispatch<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
res = normal<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Any) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.extensionInline()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.dispatchInline()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = normalInline(it)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Any?) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.extensionInline()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.dispatchInline()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = normalInline(it)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,51 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: Foo): Foo {
inline fun <T> dispatchInline(): T = (value as FooHolder).value as T
}
inline fun <T> IC.extensionInline(): T = (value as FooHolder).value as T
inline fun <T> normalInline(a: IC): T = (a.value as FooHolder).value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.extensionInline()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.dispatchInline()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = normalInline(it)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun box(): String {
var res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,51 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
interface Foo
class FooHolder(val value: Any): Foo
inline class IC(val value: FooHolder): Foo {
inline fun <T> dispatchInline(): T = (value as FooHolder).value as T
}
inline fun <T> IC.extensionInline(): T = (value as FooHolder).value as T
inline fun <T> normalInline(a: IC): T = (a.value as FooHolder).value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.extensionInline()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.dispatchInline()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = normalInline(it)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun box(): String {
var res = extension<Int>(IC(FooHolder(40))) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(FooHolder(40))) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(FooHolder(40))) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +InlineClasses
// FILE: inline.kt
inline class IC(val value: Int) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.extensionInline()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.dispatchInline()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = normalInline(it)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun box(): String {
var res = extension<Int>(IC(40)) + 3
if (res != 43) return "FAIL 2: $res"
res = dispatch<Int>(IC(40)) + 4
if (res != 44) return "FAIL 3: $res"
res = normal<Int>(IC(40)) + 5
if (res != 45) return "FAIL 4: $res"
return "OK"
}
@@ -0,0 +1,50 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: inline.kt
inline class IC(val value: String) {
inline fun <T> dispatchInline(): T = value as T
}
inline fun <T> IC.extensionInline(): T = value as T
inline fun <T> normalInline(a: IC): T = a.value as T
// FILE: box.kt
// NO_CHECK_LAMBDA_INLINING
fun <T> extension(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.extensionInline()
})
fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = it.dispatchInline()
})
fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {
override fun call(it: IC): T = normalInline(it)
})
interface IFace<T, R> {
fun call(ic: T): R
}
fun <T, R> bar(value: T, f: IFace<T, R>): R {
return f.call(value)
}
fun box(): String {
var res = extension<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 2: $res"
res = dispatch<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
res = normal<String>(IC("O")) + "K"
if (res != "OK") return "FAIL 3: $res"
return "OK"
}
@@ -16481,6 +16481,163 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/box/innerNested")
@@ -1950,6 +1950,148 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -1950,6 +1950,148 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractCompileKotlinAgainstInlineKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractCompileKotlinAgainstInlineKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractCompileKotlinAgainstInlineKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractCompileKotlinAgainstInlineKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -16481,6 +16481,163 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/box/innerNested")
@@ -15081,6 +15081,163 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractIrBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractIrBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractIrBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/box/innerNested")
@@ -1950,6 +1950,148 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractIrBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractIrBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractIrBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -1950,6 +1950,148 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractIrCompileKotlinAgainstInlineKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrCompileKotlinAgainstInlineKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractIrCompileKotlinAgainstInlineKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -1950,6 +1950,148 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractJvmIrAgainstOldBoxInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractJvmIrAgainstOldBoxInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractJvmIrAgainstOldBoxInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractJvmIrAgainstOldBoxInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -1950,6 +1950,148 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractJvmOldAgainstIrBoxInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractJvmOldAgainstIrBoxInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractJvmOldAgainstIrBoxInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractJvmOldAgainstIrBoxInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -13061,6 +13061,163 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/box/innerNested")
@@ -1740,6 +1740,148 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractIrJsCodegenInlineES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrJsCodegenInlineES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractIrJsCodegenInlineES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractIrJsCodegenInlineES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -13061,6 +13061,163 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/box/innerNested")
@@ -1740,6 +1740,148 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractIrJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractIrJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractIrJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")
@@ -13126,6 +13126,163 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/result.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/box/innerNested")
@@ -1740,6 +1740,148 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
public void testWithReturnTypeManglingVal() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt");
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnboxGenericParameter extends AbstractJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInUnboxGenericParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambda extends AbstractJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInLambda() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectLiteral extends AbstractJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInObjectLiteral() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("any.kt")
public void testAny() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt");
}
@TestMetadata("anyN.kt")
public void testAnyN() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt");
}
@TestMetadata("iface.kt")
public void testIface() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt");
}
@TestMetadata("ifaceChild.kt")
public void testIfaceChild() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt");
}
@TestMetadata("primitive.kt")
public void testPrimitive() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt");
}
@TestMetadata("string.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt");
}
}
}
}
@TestMetadata("compiler/testData/codegen/boxInline/innerClasses")