Support default parameter values for inline class constructors and funs
#KT-26908 #KT-26554 Move default parameter value tests to separate directory
This commit is contained in:
@@ -106,8 +106,10 @@ public class ConstructorCodegen {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
functionCodegen.generateDefaultIfNeeded(constructorContext, constructorDescriptor, OwnerKind.IMPLEMENTATION,
|
OwnerKind ownerKindForDefault = context.getContextKind() == OwnerKind.ERASED_INLINE_CLASS
|
||||||
DefaultParameterValueLoader.DEFAULT, null);
|
? OwnerKind.ERASED_INLINE_CLASS
|
||||||
|
: OwnerKind.IMPLEMENTATION;
|
||||||
|
functionCodegen.generateDefaultIfNeeded(constructorContext, constructorDescriptor, ownerKindForDefault, DefaultParameterValueLoader.DEFAULT, null);
|
||||||
|
|
||||||
registerAccessorForHiddenConstructorIfNeeded(constructorDescriptor);
|
registerAccessorForHiddenConstructorIfNeeded(constructorDescriptor);
|
||||||
|
|
||||||
@@ -140,7 +142,10 @@ public class ConstructorCodegen {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
functionCodegen.generateDefaultIfNeeded(constructorContext, constructorDescriptor, OwnerKind.IMPLEMENTATION,
|
OwnerKind ownerKindForDefault = context.getContextKind() == OwnerKind.ERASED_INLINE_CLASS
|
||||||
|
? OwnerKind.ERASED_INLINE_CLASS
|
||||||
|
: OwnerKind.IMPLEMENTATION;
|
||||||
|
functionCodegen.generateDefaultIfNeeded(constructorContext, constructorDescriptor, ownerKindForDefault,
|
||||||
DefaultParameterValueLoader.DEFAULT, null);
|
DefaultParameterValueLoader.DEFAULT, null);
|
||||||
|
|
||||||
new DefaultParameterValueSubstitutor(state).generateOverloadsIfNeeded(
|
new DefaultParameterValueSubstitutor(state).generateOverloadsIfNeeded(
|
||||||
|
|||||||
+3
-1
@@ -24,6 +24,7 @@ import org.jetbrains.kotlin.psi.KtClass
|
|||||||
import org.jetbrains.kotlin.psi.KtPureClassOrObject
|
import org.jetbrains.kotlin.psi.KtPureClassOrObject
|
||||||
import org.jetbrains.kotlin.psi.KtPureElement
|
import org.jetbrains.kotlin.psi.KtPureElement
|
||||||
import org.jetbrains.kotlin.resolve.calls.components.hasDefaultValue
|
import org.jetbrains.kotlin.resolve.calls.components.hasDefaultValue
|
||||||
|
import org.jetbrains.kotlin.resolve.isInlineClass
|
||||||
import org.jetbrains.kotlin.resolve.jvm.AsmTypes
|
import org.jetbrains.kotlin.resolve.jvm.AsmTypes
|
||||||
import org.jetbrains.kotlin.resolve.jvm.annotations.findJvmOverloadsAnnotation
|
import org.jetbrains.kotlin.resolve.jvm.annotations.findJvmOverloadsAnnotation
|
||||||
import org.jetbrains.kotlin.resolve.jvm.diagnostics.OtherOriginFromPure
|
import org.jetbrains.kotlin.resolve.jvm.diagnostics.OtherOriginFromPure
|
||||||
@@ -223,7 +224,7 @@ class DefaultParameterValueSubstitutor(val state: GenerationState) {
|
|||||||
v.aconst(null)
|
v.aconst(null)
|
||||||
|
|
||||||
val defaultMethod = typeMapper.mapDefaultMethod(delegateFunctionDescriptor, contextKind)
|
val defaultMethod = typeMapper.mapDefaultMethod(delegateFunctionDescriptor, contextKind)
|
||||||
if (functionDescriptor is ConstructorDescriptor) {
|
if (functionDescriptor is ConstructorDescriptor && !functionDescriptor.containingDeclaration.isInlineClass()) {
|
||||||
v.invokespecial(methodOwner.internalName, defaultMethod.name, defaultMethod.descriptor, false)
|
v.invokespecial(methodOwner.internalName, defaultMethod.name, defaultMethod.descriptor, false)
|
||||||
} else {
|
} else {
|
||||||
v.invokestatic(methodOwner.internalName, defaultMethod.name, defaultMethod.descriptor, false)
|
v.invokestatic(methodOwner.internalName, defaultMethod.name, defaultMethod.descriptor, false)
|
||||||
@@ -250,6 +251,7 @@ class DefaultParameterValueSubstitutor(val state: GenerationState) {
|
|||||||
if (classDescriptor.kind != ClassKind.CLASS) return false
|
if (classDescriptor.kind != ClassKind.CLASS) return false
|
||||||
|
|
||||||
if (classOrObject.isLocal) return false
|
if (classOrObject.isLocal) return false
|
||||||
|
if (classDescriptor.isInline) return false
|
||||||
|
|
||||||
if (CodegenBinding.canHaveOuter(state.bindingContext, classDescriptor)) return false
|
if (CodegenBinding.canHaveOuter(state.bindingContext, classDescriptor)) return false
|
||||||
|
|
||||||
|
|||||||
@@ -1151,6 +1151,10 @@ public class FunctionCodegen {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (InlineClassesUtilsKt.isInlineClass(contextClass) && kind != OwnerKind.ERASED_INLINE_CLASS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isDefaultNeeded(functionDescriptor, function)) {
|
if (!isDefaultNeeded(functionDescriptor, function)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1161,7 +1165,9 @@ public class FunctionCodegen {
|
|||||||
isEffectivelyInlineOnly(functionDescriptor) ?
|
isEffectivelyInlineOnly(functionDescriptor) ?
|
||||||
AsmUtil.NO_FLAG_PACKAGE_PRIVATE : Opcodes.ACC_PUBLIC;
|
AsmUtil.NO_FLAG_PACKAGE_PRIVATE : Opcodes.ACC_PUBLIC;
|
||||||
int flags = visibilityFlag | getDeprecatedAccessFlag(functionDescriptor) | ACC_SYNTHETIC;
|
int flags = visibilityFlag | getDeprecatedAccessFlag(functionDescriptor) | ACC_SYNTHETIC;
|
||||||
if (!(functionDescriptor instanceof ConstructorDescriptor)) {
|
if (!(functionDescriptor instanceof ConstructorDescriptor &&
|
||||||
|
!InlineClassesUtilsKt.isInlineClass(functionDescriptor.getContainingDeclaration()))
|
||||||
|
) {
|
||||||
flags |= ACC_STATIC;
|
flags |= ACC_STATIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1283,7 +1289,7 @@ public class FunctionCodegen {
|
|||||||
generator.putValueIfNeeded(new JvmKotlinType(type, null), StackValue.local(parameterIndex, type));
|
generator.putValueIfNeeded(new JvmKotlinType(type, null), StackValue.local(parameterIndex, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
CallableMethod method = state.getTypeMapper().mapToCallableMethod(functionDescriptor, false);
|
CallableMethod method = state.getTypeMapper().mapToCallableMethod(functionDescriptor, false, methodContext.getContextKind());
|
||||||
|
|
||||||
generator.genCall(method, null, false, codegen);
|
generator.genCall(method, null, false, codegen);
|
||||||
|
|
||||||
|
|||||||
@@ -1047,6 +1047,9 @@ public class KotlinTypeMapper {
|
|||||||
else if (isInterface(containingDeclaration)) {
|
else if (isInterface(containingDeclaration)) {
|
||||||
return OwnerKind.DEFAULT_IMPLS;
|
return OwnerKind.DEFAULT_IMPLS;
|
||||||
}
|
}
|
||||||
|
else if (InlineClassesUtilsKt.isInlineClass(containingDeclaration)) {
|
||||||
|
return OwnerKind.ERASED_INLINE_CLASS;
|
||||||
|
}
|
||||||
return OwnerKind.IMPLEMENTATION;
|
return OwnerKind.IMPLEMENTATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1368,8 +1371,12 @@ public class KotlinTypeMapper {
|
|||||||
) {
|
) {
|
||||||
String descriptor = method.getDescriptor();
|
String descriptor = method.getDescriptor();
|
||||||
int maskArgumentsCount = (callableDescriptor.getValueParameters().size() + Integer.SIZE - 1) / Integer.SIZE;
|
int maskArgumentsCount = (callableDescriptor.getValueParameters().size() + Integer.SIZE - 1) / Integer.SIZE;
|
||||||
String additionalArgs = StringUtil.repeat(Type.INT_TYPE.getDescriptor(), maskArgumentsCount);
|
Type defaultConstructorMarkerType =
|
||||||
additionalArgs += (isConstructor(method) ? DEFAULT_CONSTRUCTOR_MARKER : OBJECT_TYPE).getDescriptor();
|
isConstructor(method) || isInlineClassConstructor(callableDescriptor)
|
||||||
|
? DEFAULT_CONSTRUCTOR_MARKER
|
||||||
|
: OBJECT_TYPE;
|
||||||
|
String additionalArgs = StringUtil.repeat(Type.INT_TYPE.getDescriptor(), maskArgumentsCount)
|
||||||
|
+ defaultConstructorMarkerType.getDescriptor();
|
||||||
String result = descriptor.replace(")", additionalArgs + ")");
|
String result = descriptor.replace(")", additionalArgs + ")");
|
||||||
if (dispatchReceiverDescriptor != null && !isConstructor(method)) {
|
if (dispatchReceiverDescriptor != null && !isConstructor(method)) {
|
||||||
return result.replace("(", "(" + dispatchReceiverDescriptor);
|
return result.replace("(", "(" + dispatchReceiverDescriptor);
|
||||||
@@ -1385,6 +1392,11 @@ public class KotlinTypeMapper {
|
|||||||
return "<init>".equals(method.getName());
|
return "<init>".equals(method.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isInlineClassConstructor(@NotNull CallableDescriptor callableDescriptor) {
|
||||||
|
return callableDescriptor instanceof ClassConstructorDescriptor
|
||||||
|
&& InlineClassesUtilsKt.isInlineClass(callableDescriptor.getContainingDeclaration());
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public Method mapDefaultMethod(@NotNull FunctionDescriptor functionDescriptor, @NotNull OwnerKind kind) {
|
public Method mapDefaultMethod(@NotNull FunctionDescriptor functionDescriptor, @NotNull OwnerKind kind) {
|
||||||
Method jvmSignature = mapAsmMethod(functionDescriptor, kind);
|
Method jvmSignature = mapAsmMethod(functionDescriptor, kind);
|
||||||
|
|||||||
+1
-1
@@ -120,7 +120,7 @@ object InlineClassDeclarationChecker : DeclarationChecker {
|
|||||||
|
|
||||||
private fun isParameterAcceptableForInlineClass(parameter: KtParameter): Boolean {
|
private fun isParameterAcceptableForInlineClass(parameter: KtParameter): Boolean {
|
||||||
val isOpen = parameter.modalityModifier()?.node?.elementType == KtTokens.OPEN_KEYWORD
|
val isOpen = parameter.modalityModifier()?.node?.elementType == KtTokens.OPEN_KEYWORD
|
||||||
return parameter.hasValOrVar() && !parameter.isMutable && !parameter.isVarArg && !parameter.hasDefaultValue() && !isOpen
|
return parameter.hasValOrVar() && !parameter.isMutable && !parameter.isVarArg && !isOpen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// !LANGUAGE: +InlineClasses
|
// !LANGUAGE: +InlineClasses
|
||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||||
|
|
||||||
inline class Z(val z: Int)
|
inline class Z(val z: Int)
|
||||||
|
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// !LANGUAGE: +InlineClasses
|
||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
|
||||||
|
inline class Z(val x: Int) {
|
||||||
|
fun test(y: Int = 42) = x + y
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
if (Z(800).test() != 842) throw AssertionError()
|
||||||
|
if (Z(400).test(32) != 432) throw AssertionError()
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
// !LANGUAGE: +InlineClasses
|
||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
|
||||||
|
inline class Z(val x: Int = 1234)
|
||||||
|
inline class L(val x: Long = 1234L)
|
||||||
|
inline class S(val x: String = "foobar")
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
if (Z().x != 1234) throw AssertionError()
|
||||||
|
if (L().x != 1234L) throw AssertionError()
|
||||||
|
if (S().x != "foobar") throw AssertionError()
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
// !LANGUAGE: +InlineClasses
|
||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
|
||||||
|
inline class Z(val x: Int) {
|
||||||
|
constructor(x: Long = 42L) : this(x.toInt())
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
if (Z().x != 42) throw AssertionError()
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// !LANGUAGE: +InlineClasses
|
||||||
|
// IGNORE_BACKEND: JS, JS_IR, JVM_IR
|
||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
data class RGBA(val rgba: Int)
|
||||||
|
|
||||||
|
inline class RgbaArray(val array: IntArray) {
|
||||||
|
val size: Int get() = array.size
|
||||||
|
|
||||||
|
fun fill(value: RGBA, start: Int = 0, end: Int = this.size): Unit = array.fill(value.rgba, start, end)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val rgbas = RgbaArray(IntArray(10))
|
||||||
|
rgbas.fill(RGBA(123456))
|
||||||
|
for (i in rgbas.array.indices) {
|
||||||
|
if (rgbas.array[i] != 123456) throw AssertionError()
|
||||||
|
}
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
// !LANGUAGE: +InlineClasses
|
||||||
|
|
||||||
|
inline class Test(val x: Int = 0) {
|
||||||
|
constructor(a: Int, b: Int, c: Int = 42) : this(a + b + c)
|
||||||
|
}
|
||||||
Vendored
+19
@@ -0,0 +1,19 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public final class Test {
|
||||||
|
private final field x: int
|
||||||
|
private synthetic method <init>(p0: int): void
|
||||||
|
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Test
|
||||||
|
public synthetic static method constructor-impl$default(p0: int, p1: int, p2: int, p3: int, p4: kotlin.jvm.internal.DefaultConstructorMarker): int
|
||||||
|
public synthetic static method constructor-impl$default(p0: int, p1: int, p2: kotlin.jvm.internal.DefaultConstructorMarker): int
|
||||||
|
public static method constructor-impl(p0: int): int
|
||||||
|
public static method constructor-impl(p0: int, p1: int, p2: int): int
|
||||||
|
public method equals(p0: java.lang.Object): boolean
|
||||||
|
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
|
||||||
|
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||||
|
public final method getX(): int
|
||||||
|
public method hashCode(): int
|
||||||
|
public static method hashCode-impl(p0: int): int
|
||||||
|
public method toString(): java.lang.String
|
||||||
|
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: int): java.lang.String
|
||||||
|
public synthetic final method unbox-impl(): int
|
||||||
|
}
|
||||||
compiler/testData/diagnostics/tests/inlineClasses/inlineClassConstructorParameterWithDefaultValue.kt
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
// !LANGUAGE: +InlineClasses
|
||||||
|
|
||||||
|
inline class Test(val x: Int = 42)
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public final inline class Test {
|
||||||
|
public constructor Test(/*0*/ x: kotlin.Int = ...)
|
||||||
|
public final val x: kotlin.Int
|
||||||
|
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
@@ -10907,6 +10907,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.kt");
|
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassConstructorParameterWithDefaultValue.kt")
|
||||||
|
public void testInlineClassConstructorParameterWithDefaultValue() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassConstructorParameterWithDefaultValue.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineClassDeclarationCheck.kt")
|
@TestMetadata("inlineClassDeclarationCheck.kt")
|
||||||
public void testInlineClassDeclarationCheck() throws Exception {
|
public void testInlineClassDeclarationCheck() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.kt");
|
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.kt");
|
||||||
|
|||||||
Generated
+5
@@ -10907,6 +10907,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
|||||||
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.kt");
|
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassConstructorParameterWithDefaultValue.kt")
|
||||||
|
public void testInlineClassConstructorParameterWithDefaultValue() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassConstructorParameterWithDefaultValue.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineClassDeclarationCheck.kt")
|
@TestMetadata("inlineClassDeclarationCheck.kt")
|
||||||
public void testInlineClassDeclarationCheck() throws Exception {
|
public void testInlineClassDeclarationCheck() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.kt");
|
runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.kt");
|
||||||
|
|||||||
+58
-25
@@ -11649,36 +11649,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultConstructorParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
||||||
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
|
||||||
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultValueOfInlineClassTypeInInlineFun.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
||||||
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
||||||
@@ -12137,6 +12112,64 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class DefaultParameterValues extends AbstractBlackBoxCodegenTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInDefaultParameterValues() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultConstructorParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
||||||
|
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultValueOfInlineClassTypeInInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassFun.kt")
|
||||||
|
public void testInlineClassFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||||
|
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassPrimaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassSecondaryConstructor.kt")
|
||||||
|
public void testInlineClassSecondaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassSecondaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt26554.kt")
|
||||||
|
public void testKt26554() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/kt26554.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+5
@@ -314,6 +314,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("constructorsWithDefaultParameterValues.kt")
|
||||||
|
public void testConstructorsWithDefaultParameterValues() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/constructorsWithDefaultParameterValues.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineClassMembersVisibility.kt")
|
@TestMetadata("inlineClassMembersVisibility.kt")
|
||||||
public void testInlineClassMembersVisibility() throws Exception {
|
public void testInlineClassMembersVisibility() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassMembersVisibility.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassMembersVisibility.kt");
|
||||||
|
|||||||
+58
-25
@@ -11649,36 +11649,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultConstructorParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
||||||
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
|
||||||
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultValueOfInlineClassTypeInInlineFun.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
||||||
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
||||||
@@ -12137,6 +12112,64 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class DefaultParameterValues extends AbstractLightAnalysisModeTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInDefaultParameterValues() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultConstructorParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
||||||
|
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultValueOfInlineClassTypeInInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassFun.kt")
|
||||||
|
public void testInlineClassFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||||
|
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassPrimaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassSecondaryConstructor.kt")
|
||||||
|
public void testInlineClassSecondaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassSecondaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt26554.kt")
|
||||||
|
public void testKt26554() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/kt26554.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+58
-25
@@ -11654,36 +11654,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultConstructorParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
||||||
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
|
||||||
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultValueOfInlineClassTypeInInlineFun.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
||||||
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
||||||
@@ -12142,6 +12117,64 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class DefaultParameterValues extends AbstractIrBlackBoxCodegenTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInDefaultParameterValues() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultConstructorParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
||||||
|
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultValueOfInlineClassTypeInInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassFun.kt")
|
||||||
|
public void testInlineClassFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||||
|
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassPrimaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassSecondaryConstructor.kt")
|
||||||
|
public void testInlineClassSecondaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassSecondaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt26554.kt")
|
||||||
|
public void testKt26554() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/kt26554.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+58
-25
@@ -10189,36 +10189,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultConstructorParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
||||||
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
|
||||||
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultValueOfInlineClassTypeInInlineFun.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
||||||
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
||||||
@@ -10672,6 +10647,64 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class DefaultParameterValues extends AbstractIrJsCodegenBoxTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInDefaultParameterValues() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultConstructorParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
||||||
|
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultValueOfInlineClassTypeInInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassFun.kt")
|
||||||
|
public void testInlineClassFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||||
|
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassPrimaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassSecondaryConstructor.kt")
|
||||||
|
public void testInlineClassSecondaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassSecondaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt26554.kt")
|
||||||
|
public void testKt26554() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/kt26554.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+58
-25
@@ -11234,36 +11234,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultConstructorParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
|
||||||
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
|
||||||
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
|
||||||
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultValueOfInlineClassTypeInInlineFun.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
@TestMetadata("elvisWithInlineClassAndNullConstant.kt")
|
||||||
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
public void testElvisWithInlineClassAndNullConstant() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/elvisWithInlineClassAndNullConstant.kt");
|
||||||
@@ -11717,6 +11692,64 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class DefaultParameterValues extends AbstractJsCodegenBoxTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInDefaultParameterValues() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultConstructorParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultConstructorParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultConstructorParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultInterfaceFunParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultInterfaceFunParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultInterfaceFunParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassType.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultParameterValuesOfInlineClassTypeBoxing.kt")
|
||||||
|
public void testDefaultParameterValuesOfInlineClassTypeBoxing() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultParameterValuesOfInlineClassTypeBoxing.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("defaultValueOfInlineClassTypeInInlineFun.kt")
|
||||||
|
public void testDefaultValueOfInlineClassTypeInInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultValueOfInlineClassTypeInInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassFun.kt")
|
||||||
|
public void testInlineClassFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||||
|
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassPrimaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassSecondaryConstructor.kt")
|
||||||
|
public void testInlineClassSecondaryConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassSecondaryConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt26554.kt")
|
||||||
|
public void testKt26554() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/kt26554.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user