Support inline class values inside string templates through boxing
#KT-25626 Fixed #KT-25613 Open
This commit is contained in:
@@ -44,6 +44,7 @@ import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin;
|
||||
import org.jetbrains.kotlin.serialization.DescriptorSerializer;
|
||||
import org.jetbrains.kotlin.synthetic.SyntheticJavaPropertyDescriptor;
|
||||
import org.jetbrains.kotlin.types.KotlinType;
|
||||
import org.jetbrains.kotlin.types.SimpleType;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter;
|
||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||
@@ -527,15 +528,38 @@ public class AsmUtil {
|
||||
v.invokespecial("java/lang/StringBuilder", "<init>", "()V", false);
|
||||
}
|
||||
|
||||
public static void genInvokeAppendMethod(InstructionAdapter v, Type type) {
|
||||
type = stringBuilderAppendType(type);
|
||||
v.invokevirtual("java/lang/StringBuilder", "append", "(" + type.getDescriptor() + ")Ljava/lang/StringBuilder;", false);
|
||||
public static void genInvokeAppendMethod(@NotNull InstructionAdapter v, @NotNull Type type, @Nullable KotlinType kotlinType) {
|
||||
Type appendParameterType;
|
||||
if (kotlinType != null && InlineClassesUtilsKt.isInlineClassType(kotlinType)) {
|
||||
appendParameterType = OBJECT_TYPE;
|
||||
SimpleType nullableAnyType = kotlinType.getConstructor().getBuiltIns().getNullableAnyType();
|
||||
StackValue.coerce(type, kotlinType, appendParameterType, nullableAnyType, v);
|
||||
}
|
||||
else {
|
||||
appendParameterType = stringBuilderAppendType(type);
|
||||
}
|
||||
|
||||
v.invokevirtual("java/lang/StringBuilder", "append", "(" + appendParameterType.getDescriptor() + ")Ljava/lang/StringBuilder;", false);
|
||||
}
|
||||
|
||||
public static StackValue genToString(StackValue receiver, Type receiverType) {
|
||||
public static StackValue genToString(
|
||||
@NotNull StackValue receiver,
|
||||
@NotNull Type receiverType,
|
||||
@Nullable KotlinType receiverKotlinType
|
||||
) {
|
||||
return StackValue.operation(JAVA_STRING_TYPE, v -> {
|
||||
Type type = stringValueOfType(receiverType);
|
||||
receiver.put(type, v);
|
||||
Type type;
|
||||
KotlinType kotlinType;
|
||||
if (receiverKotlinType != null && InlineClassesUtilsKt.isInlineClassType(receiverKotlinType)) {
|
||||
type = OBJECT_TYPE;
|
||||
kotlinType = receiverKotlinType.getConstructor().getBuiltIns().getNullableAnyType();
|
||||
}
|
||||
else {
|
||||
type = stringValueOfType(receiverType);
|
||||
kotlinType = null;
|
||||
}
|
||||
|
||||
receiver.put(type, kotlinType, v);
|
||||
v.invokestatic("java/lang/String", "valueOf", "(" + type.getDescriptor() + ")Ljava/lang/String;", false);
|
||||
return null;
|
||||
});
|
||||
|
||||
@@ -808,7 +808,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
StringTemplateEntry entry = entries.get(0);
|
||||
if (entry instanceof StringTemplateEntry.Expression) {
|
||||
KtExpression expr = ((StringTemplateEntry.Expression) entry).expression;
|
||||
return genToString(gen(expr), expressionType(expr));
|
||||
return genToString(gen(expr), expressionType(expr), kotlinType(expr));
|
||||
}
|
||||
else {
|
||||
return StackValue.constant(((StringTemplateEntry.Constant) entry).value, type);
|
||||
@@ -833,11 +833,11 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
String value = ((StringTemplateEntry.Constant) entry).value;
|
||||
if (value.length() == 1) {
|
||||
v.iconst(value.charAt(0));
|
||||
genInvokeAppendMethod(v, Type.CHAR_TYPE);
|
||||
genInvokeAppendMethod(v, Type.CHAR_TYPE, null);
|
||||
}
|
||||
else {
|
||||
v.aconst(value);
|
||||
genInvokeAppendMethod(v, JAVA_STRING_TYPE);
|
||||
genInvokeAppendMethod(v, JAVA_STRING_TYPE, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3739,11 +3739,12 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
Type exprType = expressionType(expr);
|
||||
KotlinType exprKotlinType = kotlinType(expr);
|
||||
if (compileTimeConstant != null) {
|
||||
StackValue.constant(compileTimeConstant.getValue(), exprType).put(exprType, null, v);
|
||||
StackValue.constant(compileTimeConstant.getValue(), exprType, exprKotlinType).put(exprType, exprKotlinType, v);
|
||||
} else {
|
||||
gen(expr, exprType, exprKotlinType);
|
||||
}
|
||||
genInvokeAppendMethod(v, exprType.getSort() == Type.ARRAY ? OBJECT_TYPE : exprType);
|
||||
|
||||
genInvokeAppendMethod(v, exprType.getSort() == Type.ARRAY ? OBJECT_TYPE : exprType, exprKotlinType);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -518,7 +518,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
}
|
||||
}
|
||||
|
||||
public Type genPropertyOnStack(
|
||||
public JvmKotlinType genPropertyOnStack(
|
||||
InstructionAdapter iv,
|
||||
MethodContext context,
|
||||
@NotNull PropertyDescriptor propertyDescriptor,
|
||||
@@ -528,16 +528,19 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
iv.load(index, classAsmType);
|
||||
if (couldUseDirectAccessToProperty(propertyDescriptor, /* forGetter = */ true,
|
||||
/* isDelegated = */ false, context, state.getShouldInlineConstVals())) {
|
||||
Type type = typeMapper.mapType(propertyDescriptor.getType());
|
||||
KotlinType kotlinType = propertyDescriptor.getType();
|
||||
Type type = typeMapper.mapType(kotlinType);
|
||||
String fieldName = ((FieldOwnerContext) context.getParentContext()).getFieldName(propertyDescriptor, false);
|
||||
iv.getfield(classAsmType.getInternalName(), fieldName, type.getDescriptor());
|
||||
return type;
|
||||
return new JvmKotlinType(type, kotlinType);
|
||||
}
|
||||
else {
|
||||
PropertyGetterDescriptor getter = propertyDescriptor.getGetter();
|
||||
|
||||
//noinspection ConstantConditions
|
||||
Method method = typeMapper.mapAsmMethod(propertyDescriptor.getGetter());
|
||||
Method method = typeMapper.mapAsmMethod(getter);
|
||||
iv.invokevirtual(classAsmType.getInternalName(), method.getName(), method.getDescriptor(), false);
|
||||
return method.getReturnType();
|
||||
return new JvmKotlinType(method.getReturnType(), getter.getReturnType());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,11 +585,11 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
KotlinType kotlinType = propertyDescriptor.getReturnType();
|
||||
Type asmType = typeMapper.mapType(kotlinType);
|
||||
|
||||
Type thisPropertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||
StackValue.coerce(thisPropertyType, asmType, iv);
|
||||
JvmKotlinType thisPropertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||
StackValue.coerce(thisPropertyType.getType(), thisPropertyType.getKotlinType(), asmType, kotlinType, iv);
|
||||
|
||||
Type otherPropertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 2);
|
||||
StackValue.coerce(otherPropertyType, asmType, iv);
|
||||
JvmKotlinType otherPropertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 2);
|
||||
StackValue.coerce(otherPropertyType.getType(), otherPropertyType.getKotlinType(), asmType, kotlinType, iv);
|
||||
|
||||
if (asmType.getSort() == Type.FLOAT) {
|
||||
iv.invokestatic("java/lang/Float", "compare", "(FF)I", false);
|
||||
@@ -630,9 +633,10 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
iv.mul(Type.INT_TYPE);
|
||||
}
|
||||
|
||||
Type propertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||
Type asmType = typeMapper.mapType(propertyDescriptor);
|
||||
StackValue.coerce(propertyType, asmType, iv);
|
||||
JvmKotlinType propertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||
KotlinType kotlinType = propertyDescriptor.getReturnType();
|
||||
Type asmType = typeMapper.mapType(kotlinType);
|
||||
StackValue.coerce(propertyType.getType(), propertyType.getKotlinType(), asmType, kotlinType, iv);
|
||||
|
||||
Label ifNull = null;
|
||||
if (!isPrimitive(asmType)) {
|
||||
@@ -684,28 +688,29 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
else {
|
||||
iv.aconst(", " + propertyDescriptor.getName().asString() + "=");
|
||||
}
|
||||
genInvokeAppendMethod(iv, JAVA_STRING_TYPE);
|
||||
genInvokeAppendMethod(iv, JAVA_STRING_TYPE, null);
|
||||
|
||||
Type type = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||
JvmKotlinType type = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||
Type asmType = type.getType();
|
||||
|
||||
if (type.getSort() == Type.ARRAY) {
|
||||
Type elementType = correctElementType(type);
|
||||
if (asmType.getSort() == Type.ARRAY) {
|
||||
Type elementType = correctElementType(asmType);
|
||||
if (elementType.getSort() == Type.OBJECT || elementType.getSort() == Type.ARRAY) {
|
||||
iv.invokestatic("java/util/Arrays", "toString", "([Ljava/lang/Object;)Ljava/lang/String;", false);
|
||||
type = JAVA_STRING_TYPE;
|
||||
asmType = JAVA_STRING_TYPE;
|
||||
}
|
||||
else {
|
||||
if (elementType.getSort() != Type.CHAR) {
|
||||
iv.invokestatic("java/util/Arrays", "toString", "(" + type.getDescriptor() + ")Ljava/lang/String;", false);
|
||||
type = JAVA_STRING_TYPE;
|
||||
iv.invokestatic("java/util/Arrays", "toString", "(" + asmType.getDescriptor() + ")Ljava/lang/String;", false);
|
||||
asmType = JAVA_STRING_TYPE;
|
||||
}
|
||||
}
|
||||
}
|
||||
genInvokeAppendMethod(iv, type);
|
||||
genInvokeAppendMethod(iv, asmType, type.getKotlinType());
|
||||
}
|
||||
|
||||
iv.aconst(")");
|
||||
genInvokeAppendMethod(iv, JAVA_STRING_TYPE);
|
||||
genInvokeAppendMethod(iv, JAVA_STRING_TYPE, null);
|
||||
|
||||
iv.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
|
||||
iv.areturn(JAVA_STRING_TYPE);
|
||||
@@ -732,8 +737,8 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
bindingContext.get(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, descriptorToDeclaration(parameter));
|
||||
assert property != null : "Property descriptor is not found for primary constructor parameter: " + parameter;
|
||||
|
||||
Type propertyType = genPropertyOnStack(iv, context, property, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||
StackValue.coerce(propertyType, componentType, iv);
|
||||
JvmKotlinType propertyType = genPropertyOnStack(iv, context, property, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||
StackValue.coerce(propertyType.getType(), componentType, iv);
|
||||
}
|
||||
iv.areturn(componentType);
|
||||
}
|
||||
|
||||
@@ -1456,7 +1456,7 @@ public abstract class StackValue {
|
||||
if (getter == null) {
|
||||
assert fieldName != null : "Property should have either a getter or a field name: " + descriptor;
|
||||
assert backingFieldOwner != null : "Property should have either a getter or a backingFieldOwner: " + descriptor;
|
||||
if (inlineConstantIfNeeded(type, v)) return;
|
||||
if (inlineConstantIfNeeded(type, kotlinType, v)) return;
|
||||
|
||||
v.visitFieldInsn(isStaticPut ? GETSTATIC : GETFIELD,
|
||||
backingFieldOwner.getInternalName(), fieldName, this.type.getDescriptor());
|
||||
@@ -1499,19 +1499,19 @@ public abstract class StackValue {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean inlineConstantIfNeeded(@NotNull Type type, @NotNull InstructionAdapter v) {
|
||||
private boolean inlineConstantIfNeeded(@NotNull Type type, @Nullable KotlinType kotlinType, @NotNull InstructionAdapter v) {
|
||||
if (JvmCodegenUtil.isInlinedJavaConstProperty(descriptor)) {
|
||||
return inlineConstant(type, v);
|
||||
return inlineConstant(type, kotlinType, v);
|
||||
}
|
||||
|
||||
if (descriptor.isConst() && codegen.getState().getShouldInlineConstVals()) {
|
||||
return inlineConstant(type, v);
|
||||
return inlineConstant(type, kotlinType, v);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean inlineConstant(@NotNull Type type, @NotNull InstructionAdapter v) {
|
||||
private boolean inlineConstant(@NotNull Type type, @Nullable KotlinType kotlinType, @NotNull InstructionAdapter v) {
|
||||
assert AsmUtil.isPrimitive(this.type) || AsmTypes.JAVA_STRING_TYPE.equals(this.type) :
|
||||
"Const property should have primitive or string type: " + descriptor;
|
||||
assert isStaticPut : "Const property should be static" + descriptor;
|
||||
@@ -1524,7 +1524,7 @@ public abstract class StackValue {
|
||||
value = ((Double) value).floatValue();
|
||||
}
|
||||
|
||||
StackValue.constant(value, this.type).putSelector(type, null, v);
|
||||
StackValue.constant(value, this.type, this.kotlinType).putSelector(type, kotlinType, v);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class Concat : IntrinsicMethod() {
|
||||
receiver.put(AsmTypes.JAVA_STRING_TYPE, v)
|
||||
genStringBuilderConstructor(v)
|
||||
v.swap()
|
||||
genInvokeAppendMethod(v, returnType)
|
||||
genInvokeAppendMethod(v, returnType, null)
|
||||
codegen.invokeAppend(v, arguments[0])
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class Concat : IntrinsicMethod() {
|
||||
// in case of callable reference passed to a generic function, e.g.:
|
||||
// charArrayOf('O', 'K').fold("", String::plus)
|
||||
// TODO Make String::plus generic, and invoke proper StringBuilder#append.
|
||||
AsmUtil.genInvokeAppendMethod(v, AsmTypes.OBJECT_TYPE)
|
||||
AsmUtil.genInvokeAppendMethod(v, AsmTypes.OBJECT_TYPE, null)
|
||||
v.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -647,7 +647,8 @@ class ExpressionCodegen(
|
||||
override fun visitStringConcatenation(expression: IrStringConcatenation, data: BlockInfo): StackValue {
|
||||
AsmUtil.genStringBuilderConstructor(mv)
|
||||
expression.arguments.forEach {
|
||||
AsmUtil.genInvokeAppendMethod(mv, gen(it, data).type)
|
||||
val stackValue = gen(it, data)
|
||||
AsmUtil.genInvokeAppendMethod(mv, stackValue.type, stackValue.kotlinType)
|
||||
}
|
||||
|
||||
mv.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false)
|
||||
|
||||
@@ -56,7 +56,7 @@ class Concat : IntrinsicMethod() {
|
||||
receiver.put(AsmTypes.OBJECT_TYPE, v)
|
||||
genStringBuilderConstructor(v)
|
||||
v.swap()
|
||||
genInvokeAppendMethod(v, returnType)
|
||||
genInvokeAppendMethod(v, returnType, null)
|
||||
codegen.invokeAppend(v, arguments.get(0))
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class Concat : IntrinsicMethod() {
|
||||
return object : IrIntrinsicFunction(expression, signature, context, argsTypes) {
|
||||
|
||||
override fun genInvokeInstruction(v: InstructionAdapter) {
|
||||
AsmUtil.genInvokeAppendMethod(v, argsTypes[1])
|
||||
AsmUtil.genInvokeAppendMethod(v, argsTypes[1], null)
|
||||
v.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false)
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ class Concat : IntrinsicMethod() {
|
||||
// in case of callable reference passed to a generic function, e.g.:
|
||||
// charArrayOf('O', 'K').fold("", String::plus)
|
||||
// TODO Make String::plus generic, and invoke proper StringBuilder#append.
|
||||
AsmUtil.genInvokeAppendMethod(v, AsmTypes.OBJECT_TYPE)
|
||||
AsmUtil.genInvokeAppendMethod(v, AsmTypes.OBJECT_TYPE, null)
|
||||
v.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false)
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Augmented(val x: Int) {
|
||||
override fun toString(): String = (x + 1).toString()
|
||||
}
|
||||
|
||||
inline class AsAny(val a: Any) {
|
||||
override fun toString(): String = "AsAny: $a"
|
||||
}
|
||||
|
||||
data class AugmentedAndAsAny(val a: Augmented, val b: AsAny)
|
||||
|
||||
fun box(): String {
|
||||
val a = Augmented(0)
|
||||
val single = "$a"
|
||||
if (single != "1") return "Fail 1: $single"
|
||||
|
||||
val asAny = AsAny(42)
|
||||
val asAnyString = "$asAny"
|
||||
if (asAnyString != "AsAny: 42") return "Fail 2: $asAnyString"
|
||||
|
||||
val b = Augmented(1)
|
||||
val two = "$a and $b"
|
||||
if (two != "1 and 2") return "Fail 3: $two"
|
||||
|
||||
val d = AugmentedAndAsAny(a, asAny)
|
||||
if (d.toString() != "AugmentedAndAsAny(a=1, b=AsAny: 42)") return "Fail 4: $d"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// WITH_UNSIGNED
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR, JS
|
||||
|
||||
const val maxUByte: UByte = 0xFFu
|
||||
|
||||
fun custom(a: Any): String {
|
||||
return "Custom: $a, isUByte: ${a is UByte}"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val result = custom(maxUByte)
|
||||
if (result != "Custom: 255, isUByte: true") return "Fail: $result"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_UNSIGNED
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR, JS
|
||||
|
||||
const val MAX_BYTE: UByte = 0xFFu
|
||||
const val HUNDRED: UByte = 100u
|
||||
|
||||
fun box(): String {
|
||||
val maxByteStringSingle = "$MAX_BYTE"
|
||||
if (maxByteStringSingle != MAX_BYTE.toString() || maxByteStringSingle != "255") return "Fail 1: $maxByteStringSingle"
|
||||
|
||||
val twoHundredUByte = "${(HUNDRED * 2u).toUByte()}"
|
||||
if (twoHundredUByte != "200") return "Fail 2: $twoHundredUByte"
|
||||
|
||||
val complexOnlyConstants = "Max: $MAX_BYTE, two hundred: $twoHundredUByte"
|
||||
if (complexOnlyConstants != "Max: 255, two hundred: 200") return "Fail 3: $complexOnlyConstants"
|
||||
|
||||
val nonConst = UByte.MAX_VALUE + 1u
|
||||
val complex = "Max UByte: $MAX_BYTE, next: $nonConst"
|
||||
if (complex != "Max UByte: 255, next: 256") return "Fail 4: $complex"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Generated
+15
@@ -11236,6 +11236,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassImplementsCollection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassValuesInsideStrings.kt")
|
||||
public void testInlineClassValuesInsideStrings() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassValuesInsideStrings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassesCheckCast.kt")
|
||||
public void testInlineClassesCheckCast() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
||||
@@ -21445,6 +21450,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boxConstValOfUnsignedType.kt")
|
||||
public void testBoxConstValOfUnsignedType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/boxConstValOfUnsignedType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("checkBasicUnsignedLiterals.kt")
|
||||
public void testCheckBasicUnsignedLiterals() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt");
|
||||
@@ -21470,6 +21480,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsignedTypeValuesInsideStringTemplates.kt")
|
||||
public void testUnsignedTypeValuesInsideStringTemplates() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypeValuesInsideStringTemplates.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
||||
|
||||
+15
@@ -11236,6 +11236,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassImplementsCollection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassValuesInsideStrings.kt")
|
||||
public void testInlineClassValuesInsideStrings() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassValuesInsideStrings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassesCheckCast.kt")
|
||||
public void testInlineClassesCheckCast() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
||||
@@ -21445,6 +21450,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boxConstValOfUnsignedType.kt")
|
||||
public void testBoxConstValOfUnsignedType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/boxConstValOfUnsignedType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("checkBasicUnsignedLiterals.kt")
|
||||
public void testCheckBasicUnsignedLiterals() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt");
|
||||
@@ -21470,6 +21480,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsignedTypeValuesInsideStringTemplates.kt")
|
||||
public void testUnsignedTypeValuesInsideStringTemplates() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypeValuesInsideStringTemplates.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
||||
|
||||
+15
@@ -11236,6 +11236,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassImplementsCollection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassValuesInsideStrings.kt")
|
||||
public void testInlineClassValuesInsideStrings() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassValuesInsideStrings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassesCheckCast.kt")
|
||||
public void testInlineClassesCheckCast() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
||||
@@ -21445,6 +21450,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boxConstValOfUnsignedType.kt")
|
||||
public void testBoxConstValOfUnsignedType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/boxConstValOfUnsignedType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("checkBasicUnsignedLiterals.kt")
|
||||
public void testCheckBasicUnsignedLiterals() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt");
|
||||
@@ -21470,6 +21480,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsignedTypeValuesInsideStringTemplates.kt")
|
||||
public void testUnsignedTypeValuesInsideStringTemplates() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypeValuesInsideStringTemplates.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
||||
|
||||
+15
@@ -9861,6 +9861,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassValuesInsideStrings.kt")
|
||||
public void testInlineClassValuesInsideStrings() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassValuesInsideStrings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassesCheckCast.kt")
|
||||
public void testInlineClassesCheckCast() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
||||
@@ -19385,6 +19390,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boxConstValOfUnsignedType.kt")
|
||||
public void testBoxConstValOfUnsignedType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/boxConstValOfUnsignedType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("iterateOverArrayOfUnsignedValues.kt")
|
||||
public void testIterateOverArrayOfUnsignedValues() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/iterateOverArrayOfUnsignedValues.kt");
|
||||
@@ -19395,6 +19405,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/iterateOverListOfBoxedUnsignedValues.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsignedTypeValuesInsideStringTemplates.kt")
|
||||
public void testUnsignedTypeValuesInsideStringTemplates() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypeValuesInsideStringTemplates.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
||||
|
||||
+15
@@ -10866,6 +10866,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassValuesInsideStrings.kt")
|
||||
public void testInlineClassValuesInsideStrings() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassValuesInsideStrings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassesCheckCast.kt")
|
||||
public void testInlineClassesCheckCast() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
||||
@@ -20390,6 +20395,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boxConstValOfUnsignedType.kt")
|
||||
public void testBoxConstValOfUnsignedType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/boxConstValOfUnsignedType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("iterateOverArrayOfUnsignedValues.kt")
|
||||
public void testIterateOverArrayOfUnsignedValues() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/iterateOverArrayOfUnsignedValues.kt");
|
||||
@@ -20400,6 +20410,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/iterateOverListOfBoxedUnsignedValues.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsignedTypeValuesInsideStringTemplates.kt")
|
||||
public void testUnsignedTypeValuesInsideStringTemplates() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypeValuesInsideStringTemplates.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
||||
|
||||
Reference in New Issue
Block a user