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.serialization.DescriptorSerializer;
|
||||||
import org.jetbrains.kotlin.synthetic.SyntheticJavaPropertyDescriptor;
|
import org.jetbrains.kotlin.synthetic.SyntheticJavaPropertyDescriptor;
|
||||||
import org.jetbrains.kotlin.types.KotlinType;
|
import org.jetbrains.kotlin.types.KotlinType;
|
||||||
|
import org.jetbrains.kotlin.types.SimpleType;
|
||||||
import org.jetbrains.org.objectweb.asm.*;
|
import org.jetbrains.org.objectweb.asm.*;
|
||||||
import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter;
|
import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter;
|
||||||
import org.jetbrains.org.objectweb.asm.commons.Method;
|
import org.jetbrains.org.objectweb.asm.commons.Method;
|
||||||
@@ -527,15 +528,38 @@ public class AsmUtil {
|
|||||||
v.invokespecial("java/lang/StringBuilder", "<init>", "()V", false);
|
v.invokespecial("java/lang/StringBuilder", "<init>", "()V", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void genInvokeAppendMethod(InstructionAdapter v, Type type) {
|
public static void genInvokeAppendMethod(@NotNull InstructionAdapter v, @NotNull Type type, @Nullable KotlinType kotlinType) {
|
||||||
type = stringBuilderAppendType(type);
|
Type appendParameterType;
|
||||||
v.invokevirtual("java/lang/StringBuilder", "append", "(" + type.getDescriptor() + ")Ljava/lang/StringBuilder;", false);
|
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 -> {
|
return StackValue.operation(JAVA_STRING_TYPE, v -> {
|
||||||
Type type = stringValueOfType(receiverType);
|
Type type;
|
||||||
receiver.put(type, v);
|
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);
|
v.invokestatic("java/lang/String", "valueOf", "(" + type.getDescriptor() + ")Ljava/lang/String;", false);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -808,7 +808,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
|||||||
StringTemplateEntry entry = entries.get(0);
|
StringTemplateEntry entry = entries.get(0);
|
||||||
if (entry instanceof StringTemplateEntry.Expression) {
|
if (entry instanceof StringTemplateEntry.Expression) {
|
||||||
KtExpression expr = ((StringTemplateEntry.Expression) entry).expression;
|
KtExpression expr = ((StringTemplateEntry.Expression) entry).expression;
|
||||||
return genToString(gen(expr), expressionType(expr));
|
return genToString(gen(expr), expressionType(expr), kotlinType(expr));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return StackValue.constant(((StringTemplateEntry.Constant) entry).value, type);
|
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;
|
String value = ((StringTemplateEntry.Constant) entry).value;
|
||||||
if (value.length() == 1) {
|
if (value.length() == 1) {
|
||||||
v.iconst(value.charAt(0));
|
v.iconst(value.charAt(0));
|
||||||
genInvokeAppendMethod(v, Type.CHAR_TYPE);
|
genInvokeAppendMethod(v, Type.CHAR_TYPE, null);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
v.aconst(value);
|
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);
|
Type exprType = expressionType(expr);
|
||||||
KotlinType exprKotlinType = kotlinType(expr);
|
KotlinType exprKotlinType = kotlinType(expr);
|
||||||
if (compileTimeConstant != null) {
|
if (compileTimeConstant != null) {
|
||||||
StackValue.constant(compileTimeConstant.getValue(), exprType).put(exprType, null, v);
|
StackValue.constant(compileTimeConstant.getValue(), exprType, exprKotlinType).put(exprType, exprKotlinType, v);
|
||||||
} else {
|
} else {
|
||||||
gen(expr, exprType, exprKotlinType);
|
gen(expr, exprType, exprKotlinType);
|
||||||
}
|
}
|
||||||
genInvokeAppendMethod(v, exprType.getSort() == Type.ARRAY ? OBJECT_TYPE : exprType);
|
|
||||||
|
genInvokeAppendMethod(v, exprType.getSort() == Type.ARRAY ? OBJECT_TYPE : exprType, exprKotlinType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
@@ -518,7 +518,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type genPropertyOnStack(
|
public JvmKotlinType genPropertyOnStack(
|
||||||
InstructionAdapter iv,
|
InstructionAdapter iv,
|
||||||
MethodContext context,
|
MethodContext context,
|
||||||
@NotNull PropertyDescriptor propertyDescriptor,
|
@NotNull PropertyDescriptor propertyDescriptor,
|
||||||
@@ -528,16 +528,19 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
iv.load(index, classAsmType);
|
iv.load(index, classAsmType);
|
||||||
if (couldUseDirectAccessToProperty(propertyDescriptor, /* forGetter = */ true,
|
if (couldUseDirectAccessToProperty(propertyDescriptor, /* forGetter = */ true,
|
||||||
/* isDelegated = */ false, context, state.getShouldInlineConstVals())) {
|
/* 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);
|
String fieldName = ((FieldOwnerContext) context.getParentContext()).getFieldName(propertyDescriptor, false);
|
||||||
iv.getfield(classAsmType.getInternalName(), fieldName, type.getDescriptor());
|
iv.getfield(classAsmType.getInternalName(), fieldName, type.getDescriptor());
|
||||||
return type;
|
return new JvmKotlinType(type, kotlinType);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
PropertyGetterDescriptor getter = propertyDescriptor.getGetter();
|
||||||
|
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
Method method = typeMapper.mapAsmMethod(propertyDescriptor.getGetter());
|
Method method = typeMapper.mapAsmMethod(getter);
|
||||||
iv.invokevirtual(classAsmType.getInternalName(), method.getName(), method.getDescriptor(), false);
|
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();
|
KotlinType kotlinType = propertyDescriptor.getReturnType();
|
||||||
Type asmType = typeMapper.mapType(kotlinType);
|
Type asmType = typeMapper.mapType(kotlinType);
|
||||||
|
|
||||||
Type thisPropertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
JvmKotlinType thisPropertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||||
StackValue.coerce(thisPropertyType, asmType, iv);
|
StackValue.coerce(thisPropertyType.getType(), thisPropertyType.getKotlinType(), asmType, kotlinType, iv);
|
||||||
|
|
||||||
Type otherPropertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 2);
|
JvmKotlinType otherPropertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 2);
|
||||||
StackValue.coerce(otherPropertyType, asmType, iv);
|
StackValue.coerce(otherPropertyType.getType(), otherPropertyType.getKotlinType(), asmType, kotlinType, iv);
|
||||||
|
|
||||||
if (asmType.getSort() == Type.FLOAT) {
|
if (asmType.getSort() == Type.FLOAT) {
|
||||||
iv.invokestatic("java/lang/Float", "compare", "(FF)I", false);
|
iv.invokestatic("java/lang/Float", "compare", "(FF)I", false);
|
||||||
@@ -630,9 +633,10 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
iv.mul(Type.INT_TYPE);
|
iv.mul(Type.INT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
Type propertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
JvmKotlinType propertyType = genPropertyOnStack(iv, context, propertyDescriptor, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||||
Type asmType = typeMapper.mapType(propertyDescriptor);
|
KotlinType kotlinType = propertyDescriptor.getReturnType();
|
||||||
StackValue.coerce(propertyType, asmType, iv);
|
Type asmType = typeMapper.mapType(kotlinType);
|
||||||
|
StackValue.coerce(propertyType.getType(), propertyType.getKotlinType(), asmType, kotlinType, iv);
|
||||||
|
|
||||||
Label ifNull = null;
|
Label ifNull = null;
|
||||||
if (!isPrimitive(asmType)) {
|
if (!isPrimitive(asmType)) {
|
||||||
@@ -684,28 +688,29 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
else {
|
else {
|
||||||
iv.aconst(", " + propertyDescriptor.getName().asString() + "=");
|
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) {
|
if (asmType.getSort() == Type.ARRAY) {
|
||||||
Type elementType = correctElementType(type);
|
Type elementType = correctElementType(asmType);
|
||||||
if (elementType.getSort() == Type.OBJECT || elementType.getSort() == Type.ARRAY) {
|
if (elementType.getSort() == Type.OBJECT || elementType.getSort() == Type.ARRAY) {
|
||||||
iv.invokestatic("java/util/Arrays", "toString", "([Ljava/lang/Object;)Ljava/lang/String;", false);
|
iv.invokestatic("java/util/Arrays", "toString", "([Ljava/lang/Object;)Ljava/lang/String;", false);
|
||||||
type = JAVA_STRING_TYPE;
|
asmType = JAVA_STRING_TYPE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (elementType.getSort() != Type.CHAR) {
|
if (elementType.getSort() != Type.CHAR) {
|
||||||
iv.invokestatic("java/util/Arrays", "toString", "(" + type.getDescriptor() + ")Ljava/lang/String;", false);
|
iv.invokestatic("java/util/Arrays", "toString", "(" + asmType.getDescriptor() + ")Ljava/lang/String;", false);
|
||||||
type = JAVA_STRING_TYPE;
|
asmType = JAVA_STRING_TYPE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
genInvokeAppendMethod(iv, type);
|
genInvokeAppendMethod(iv, asmType, type.getKotlinType());
|
||||||
}
|
}
|
||||||
|
|
||||||
iv.aconst(")");
|
iv.aconst(")");
|
||||||
genInvokeAppendMethod(iv, JAVA_STRING_TYPE);
|
genInvokeAppendMethod(iv, JAVA_STRING_TYPE, null);
|
||||||
|
|
||||||
iv.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
|
iv.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
|
||||||
iv.areturn(JAVA_STRING_TYPE);
|
iv.areturn(JAVA_STRING_TYPE);
|
||||||
@@ -732,8 +737,8 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
bindingContext.get(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, descriptorToDeclaration(parameter));
|
bindingContext.get(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, descriptorToDeclaration(parameter));
|
||||||
assert property != null : "Property descriptor is not found for primary constructor parameter: " + parameter;
|
assert property != null : "Property descriptor is not found for primary constructor parameter: " + parameter;
|
||||||
|
|
||||||
Type propertyType = genPropertyOnStack(iv, context, property, ImplementationBodyCodegen.this.classAsmType, 0);
|
JvmKotlinType propertyType = genPropertyOnStack(iv, context, property, ImplementationBodyCodegen.this.classAsmType, 0);
|
||||||
StackValue.coerce(propertyType, componentType, iv);
|
StackValue.coerce(propertyType.getType(), componentType, iv);
|
||||||
}
|
}
|
||||||
iv.areturn(componentType);
|
iv.areturn(componentType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1456,7 +1456,7 @@ public abstract class StackValue {
|
|||||||
if (getter == null) {
|
if (getter == null) {
|
||||||
assert fieldName != null : "Property should have either a getter or a field name: " + descriptor;
|
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;
|
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,
|
v.visitFieldInsn(isStaticPut ? GETSTATIC : GETFIELD,
|
||||||
backingFieldOwner.getInternalName(), fieldName, this.type.getDescriptor());
|
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)) {
|
if (JvmCodegenUtil.isInlinedJavaConstProperty(descriptor)) {
|
||||||
return inlineConstant(type, v);
|
return inlineConstant(type, kotlinType, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (descriptor.isConst() && codegen.getState().getShouldInlineConstVals()) {
|
if (descriptor.isConst() && codegen.getState().getShouldInlineConstVals()) {
|
||||||
return inlineConstant(type, v);
|
return inlineConstant(type, kotlinType, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
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) :
|
assert AsmUtil.isPrimitive(this.type) || AsmTypes.JAVA_STRING_TYPE.equals(this.type) :
|
||||||
"Const property should have primitive or string type: " + descriptor;
|
"Const property should have primitive or string type: " + descriptor;
|
||||||
assert isStaticPut : "Const property should be static" + descriptor;
|
assert isStaticPut : "Const property should be static" + descriptor;
|
||||||
@@ -1524,7 +1524,7 @@ public abstract class StackValue {
|
|||||||
value = ((Double) value).floatValue();
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class Concat : IntrinsicMethod() {
|
|||||||
receiver.put(AsmTypes.JAVA_STRING_TYPE, v)
|
receiver.put(AsmTypes.JAVA_STRING_TYPE, v)
|
||||||
genStringBuilderConstructor(v)
|
genStringBuilderConstructor(v)
|
||||||
v.swap()
|
v.swap()
|
||||||
genInvokeAppendMethod(v, returnType)
|
genInvokeAppendMethod(v, returnType, null)
|
||||||
codegen.invokeAppend(v, arguments[0])
|
codegen.invokeAppend(v, arguments[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ class Concat : IntrinsicMethod() {
|
|||||||
// in case of callable reference passed to a generic function, e.g.:
|
// in case of callable reference passed to a generic function, e.g.:
|
||||||
// charArrayOf('O', 'K').fold("", String::plus)
|
// charArrayOf('O', 'K').fold("", String::plus)
|
||||||
// TODO Make String::plus generic, and invoke proper StringBuilder#append.
|
// 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)
|
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 {
|
override fun visitStringConcatenation(expression: IrStringConcatenation, data: BlockInfo): StackValue {
|
||||||
AsmUtil.genStringBuilderConstructor(mv)
|
AsmUtil.genStringBuilderConstructor(mv)
|
||||||
expression.arguments.forEach {
|
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)
|
mv.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class Concat : IntrinsicMethod() {
|
|||||||
receiver.put(AsmTypes.OBJECT_TYPE, v)
|
receiver.put(AsmTypes.OBJECT_TYPE, v)
|
||||||
genStringBuilderConstructor(v)
|
genStringBuilderConstructor(v)
|
||||||
v.swap()
|
v.swap()
|
||||||
genInvokeAppendMethod(v, returnType)
|
genInvokeAppendMethod(v, returnType, null)
|
||||||
codegen.invokeAppend(v, arguments.get(0))
|
codegen.invokeAppend(v, arguments.get(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ class Concat : IntrinsicMethod() {
|
|||||||
return object : IrIntrinsicFunction(expression, signature, context, argsTypes) {
|
return object : IrIntrinsicFunction(expression, signature, context, argsTypes) {
|
||||||
|
|
||||||
override fun genInvokeInstruction(v: InstructionAdapter) {
|
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)
|
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.:
|
// in case of callable reference passed to a generic function, e.g.:
|
||||||
// charArrayOf('O', 'K').fold("", String::plus)
|
// charArrayOf('O', 'K').fold("", String::plus)
|
||||||
// TODO Make String::plus generic, and invoke proper StringBuilder#append.
|
// 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)
|
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");
|
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")
|
@TestMetadata("inlineClassesCheckCast.kt")
|
||||||
public void testInlineClassesCheckCast() throws Exception {
|
public void testInlineClassesCheckCast() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
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);
|
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")
|
@TestMetadata("checkBasicUnsignedLiterals.kt")
|
||||||
public void testCheckBasicUnsignedLiterals() throws Exception {
|
public void testCheckBasicUnsignedLiterals() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt");
|
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");
|
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")
|
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
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");
|
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")
|
@TestMetadata("inlineClassesCheckCast.kt")
|
||||||
public void testInlineClassesCheckCast() throws Exception {
|
public void testInlineClassesCheckCast() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
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);
|
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")
|
@TestMetadata("checkBasicUnsignedLiterals.kt")
|
||||||
public void testCheckBasicUnsignedLiterals() throws Exception {
|
public void testCheckBasicUnsignedLiterals() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt");
|
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");
|
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")
|
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
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");
|
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")
|
@TestMetadata("inlineClassesCheckCast.kt")
|
||||||
public void testInlineClassesCheckCast() throws Exception {
|
public void testInlineClassesCheckCast() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
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);
|
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")
|
@TestMetadata("checkBasicUnsignedLiterals.kt")
|
||||||
public void testCheckBasicUnsignedLiterals() throws Exception {
|
public void testCheckBasicUnsignedLiterals() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt");
|
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");
|
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")
|
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
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");
|
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")
|
@TestMetadata("inlineClassesCheckCast.kt")
|
||||||
public void testInlineClassesCheckCast() throws Exception {
|
public void testInlineClassesCheckCast() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
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);
|
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")
|
@TestMetadata("iterateOverArrayOfUnsignedValues.kt")
|
||||||
public void testIterateOverArrayOfUnsignedValues() throws Exception {
|
public void testIterateOverArrayOfUnsignedValues() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/iterateOverArrayOfUnsignedValues.kt");
|
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");
|
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")
|
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
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");
|
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")
|
@TestMetadata("inlineClassesCheckCast.kt")
|
||||||
public void testInlineClassesCheckCast() throws Exception {
|
public void testInlineClassesCheckCast() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCast.kt");
|
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);
|
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")
|
@TestMetadata("iterateOverArrayOfUnsignedValues.kt")
|
||||||
public void testIterateOverArrayOfUnsignedValues() throws Exception {
|
public void testIterateOverArrayOfUnsignedValues() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/iterateOverArrayOfUnsignedValues.kt");
|
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");
|
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")
|
@TestMetadata("varargsOfUnsignedTypes.kt")
|
||||||
public void testVarargsOfUnsignedTypes() throws Exception {
|
public void testVarargsOfUnsignedTypes() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
runTest("compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user