diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ClosureCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ClosureCodegen.java index 95da1862900..8057b47c882 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ClosureCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ClosureCodegen.java @@ -1,17 +1,6 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.codegen; @@ -208,7 +197,9 @@ public class ClosureCodegen extends MemberCodegen { generateBridge( typeMapper.mapAsmMethod(erasedInterfaceFunction), - typeMapper.mapAsmMethod(funDescriptor) + erasedInterfaceFunction.getReturnType(), + typeMapper.mapAsmMethod(funDescriptor), + funDescriptor.getReturnType() ); //TODO: rewrite cause ugly hack @@ -275,7 +266,12 @@ public class ClosureCodegen extends MemberCodegen { ); } - protected void generateBridge(@NotNull Method bridge, @NotNull Method delegate) { + protected void generateBridge( + @NotNull Method bridge, + @Nullable KotlinType bridgeReturnType, + @NotNull Method delegate, + @Nullable KotlinType delegateReturnType + ) { if (bridge.equals(delegate)) return; MethodVisitor mv = @@ -306,7 +302,10 @@ public class ClosureCodegen extends MemberCodegen { } iv.invokevirtual(asmType.getInternalName(), delegate.getName(), delegate.getDescriptor(), false); - StackValue.onStack(delegate.getReturnType()).put(bridge.getReturnType(), iv); + + StackValue + .onStack(delegate.getReturnType(), delegateReturnType) + .put(bridge.getReturnType(), bridgeReturnType, iv); iv.areturn(bridge.getReturnType()); diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java index 77f6e6aae6d..6e2881185a8 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java @@ -326,11 +326,15 @@ public class ExpressionCodegen extends KtVisitor impleme } public void gen(KtElement expr, Type type) { - StackValue value = Type.VOID_TYPE.equals(type) ? genStatement(expr) : gen(expr); - putStackValue(expr, type, value); + gen(expr, type, null); } - private void putStackValue(@Nullable KtElement expr, @NotNull Type type, @NotNull StackValue value) { + public void gen(KtElement expr, Type type, KotlinType kotlinType) { + StackValue value = Type.VOID_TYPE.equals(type) ? genStatement(expr) : gen(expr); + putStackValue(expr, type, kotlinType, value); + } + + private void putStackValue(@Nullable KtElement expr, @NotNull Type type, @Nullable KotlinType kotlinType, @NotNull StackValue value) { // for repl store the result of the last line into special field if (value.type != Type.VOID_TYPE && state.getReplSpecific().getShouldGenerateScriptResultValue()) { ScriptContext context = getScriptContext(); @@ -342,12 +346,7 @@ public class ExpressionCodegen extends KtVisitor impleme } } - KotlinType ktType = null; - if (expr instanceof KtExpression) { - ktType = kotlinType((KtExpression) expr); - } - - value.put(type, ktType, v); + value.put(type, kotlinType, v); } @NotNull @@ -1511,9 +1510,10 @@ public class ExpressionCodegen extends KtVisitor impleme } Type returnType = isNonLocalReturn ? nonLocalReturn.returnType : this.returnType; + KotlinType returnKotlinType = isNonLocalReturn ? null : this.context.getFunctionDescriptor().getReturnType(); StackValue valueToReturn = returnedExpression != null ? gen(returnedExpression) : StackValue.none(); - putStackValue(returnedExpression, returnType, valueToReturn); + putStackValue(returnedExpression, returnType, returnKotlinType, valueToReturn); Label afterReturnLabel = new Label(); generateFinallyBlocksIfNeeded(returnType, afterReturnLabel); @@ -1588,7 +1588,10 @@ public class ExpressionCodegen extends KtVisitor impleme ? Type.VOID_TYPE : returnType; - gen(expr, typeForExpression); + KotlinType kotlinTypeForExpression = + isBlockedNamedFunction || isVoidCoroutineLambda ? null : context.getFunctionDescriptor().getReturnType(); + + gen(expr, typeForExpression, kotlinTypeForExpression); // If it does not end with return we should return something // because if we don't there can be VerifyError (specific cases with Nothing-typed expressions) @@ -3389,7 +3392,7 @@ public class ExpressionCodegen extends KtVisitor impleme v.mark(ifNull); v.pop(); - gen(expression.getRight(), exprType); + gen(expression.getRight(), exprType, exprKotlinType); v.mark(end); return null; }); diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java index fdd62464bdf..6dfa31f1ca7 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java @@ -380,8 +380,11 @@ public abstract class StackValue { ); } - private static void unboxInlineClass(@NotNull KotlinType kotlinType, @NotNull InstructionAdapter v) { + private static void unboxInlineClass(@NotNull Type type, @NotNull KotlinType kotlinType, @NotNull InstructionAdapter v) { Type owner = KotlinTypeMapper.mapInlineClassTypeAsDeclaration(kotlinType); + + coerce(type, owner, v); + Type resultType = KotlinTypeMapper.mapUnderlyingTypeOfInlineClassType(kotlinType); v.invokevirtual( owner.getInternalName(), @@ -429,7 +432,7 @@ public abstract class StackValue { boxInlineClass(fromKotlinType, v); } else if (!isFromTypeUnboxed) { - unboxInlineClass(fromKotlinType, v); + unboxInlineClass(fromType, fromKotlinType, v); } } else { diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.kt index 7cb72795238..f5a034c5de1 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.kt @@ -48,7 +48,7 @@ class CoercionValue( class StackValueWithLeaveTask( val stackValue: StackValue, val leaveTasks: (StackValue) -> Unit -) : StackValue(stackValue.type) { +) : StackValue(stackValue.type, stackValue.kotlinType) { override fun putReceiver(v: InstructionAdapter, isRead: Boolean) { stackValue.putReceiver(v, isRead) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineCodegen.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineCodegen.kt index 0765c3ad29a..9408fe64b1a 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineCodegen.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineCodegen.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.codegen.coroutines @@ -199,7 +188,7 @@ class CoroutineCodegenForLambda private constructor( val bridgeParameters = (1 until delegate.argumentTypes.size).map { AsmTypes.OBJECT_TYPE } + delegate.argumentTypes.last() val bridge = Method(delegate.name, delegate.returnType, bridgeParameters.toTypedArray()) - generateBridge(bridge, delegate) + generateBridge(bridge, createCoroutineDescriptor.returnType, delegate, createCoroutineDescriptor.returnType) } } diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt new file mode 100644 index 00000000000..9486131d082 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt @@ -0,0 +1,42 @@ +// !LANGUAGE: +InlineClasses + +inline class Name(private val value: String) { + fun asValue(): String = value +} + +fun concat(a: Name, b: Name) = a.asValue() + b.asValue() + +inline class UInt(private val value: Int) { + fun asValue(): Int = value +} + +fun box(): String { + val o = inlinedRun { + Name("O") + } + + val k = notInlinedRun { + Name("K") + } + + if (concat(o, k) != "OK") return "fail 1" + + val a = UInt(1) + val one = inlinedRun { + a + } + + if (one.asValue() != 1) return "fail 2" + + val b = UInt(2) + val two = notInlinedRun { + b + } + + if (two.asValue() != 2) return "fail 3" + + return "OK" +} + +inline fun inlinedRun(block: () -> R): R = block() +fun notInlinedRun(block: () -> R): R = block() \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInsideLambdaAsLastExpression.kt b/compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInsideLambdaAsLastExpression.kt new file mode 100644 index 00000000000..1002fb631b8 --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInsideLambdaAsLastExpression.kt @@ -0,0 +1,19 @@ +// !LANGUAGE: +InlineClasses + +inline class UInt(private val u: Int) + +fun test(x: UInt?, y: UInt) { + val a = run { + x!! + } + + val b = run { + y + } +} + +// 2 INVOKESTATIC UInt\$Erased.box +// 3 INVOKEVIRTUAL UInt.unbox + +// 0 valueOf +// 0 intValue \ No newline at end of file diff --git a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 741bcec1eb7..88b08438fd0 100644 --- a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -10341,6 +10341,36 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes doTest(fileName); } + @TestMetadata("checkBoxingAfterAssertionOperator.kt") + public void testCheckBoxingAfterAssertionOperator() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingFromReturnTypeForInlineClasses.kt") + public void testCheckBoxingFromReturnTypeForInlineClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingOnFunctionCalls.kt") + public void testCheckBoxingOnFunctionCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingOnLocalVariableAssignments.kt") + public void testCheckBoxingOnLocalVariableAssignments() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); + doTest(fileName); + } + + @TestMetadata("checkCallingMembersInsideInlineClass.kt") + public void testCheckCallingMembersInsideInlineClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); + doTest(fileName); + } + @TestMetadata("computablePropertyInsideInlineClass.kt") public void testComputablePropertyInsideInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); @@ -10353,6 +10383,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes doTest(fileName); } + @TestMetadata("inlineClassAsLastExpressionInInLambda.kt") + public void testInlineClassAsLastExpressionInInLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); + doTest(fileName); + } + @TestMetadata("referToPropertyInCompanionObjectOfInlineClass.kt") public void testReferToPropertyInCompanionObjectOfInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 0820c5c8d15..8480a02e763 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -10341,6 +10341,36 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { doTest(fileName); } + @TestMetadata("checkBoxingAfterAssertionOperator.kt") + public void testCheckBoxingAfterAssertionOperator() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingFromReturnTypeForInlineClasses.kt") + public void testCheckBoxingFromReturnTypeForInlineClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingOnFunctionCalls.kt") + public void testCheckBoxingOnFunctionCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingOnLocalVariableAssignments.kt") + public void testCheckBoxingOnLocalVariableAssignments() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); + doTest(fileName); + } + + @TestMetadata("checkCallingMembersInsideInlineClass.kt") + public void testCheckCallingMembersInsideInlineClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); + doTest(fileName); + } + @TestMetadata("computablePropertyInsideInlineClass.kt") public void testComputablePropertyInsideInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); @@ -10353,6 +10383,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { doTest(fileName); } + @TestMetadata("inlineClassAsLastExpressionInInLambda.kt") + public void testInlineClassAsLastExpressionInInLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); + doTest(fileName); + } + @TestMetadata("referToPropertyInCompanionObjectOfInlineClass.kt") public void testReferToPropertyInCompanionObjectOfInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index cf25dc59ccd..111f9ada27f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -1920,6 +1920,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { doTest(fileName); } + @TestMetadata("boxUnboxInsideLambdaAsLastExpression.kt") + public void testBoxUnboxInsideLambdaAsLastExpression() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInsideLambdaAsLastExpression.kt"); + doTest(fileName); + } + @TestMetadata("callMemberMethodsInsideInlineClass.kt") public void testCallMemberMethodsInsideInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/callMemberMethodsInsideInlineClass.kt"); @@ -1950,12 +1956,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { doTest(fileName); } - @TestMetadata("inlineClassCallsDefaultValue.kt") - public void testInlineClassCallsDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassCallsDefaultValue.kt"); - doTest(fileName); - } - @TestMetadata("inlineClassesUnboxingAfterAssertionOperator.kt") public void testInlineClassesUnboxingAfterAssertionOperator() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassesUnboxingAfterAssertionOperator.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 356113daf6f..bc8ea2d3576 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -10341,6 +10341,36 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes doTest(fileName); } + @TestMetadata("checkBoxingAfterAssertionOperator.kt") + public void testCheckBoxingAfterAssertionOperator() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingFromReturnTypeForInlineClasses.kt") + public void testCheckBoxingFromReturnTypeForInlineClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingOnFunctionCalls.kt") + public void testCheckBoxingOnFunctionCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingOnLocalVariableAssignments.kt") + public void testCheckBoxingOnLocalVariableAssignments() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); + doTest(fileName); + } + + @TestMetadata("checkCallingMembersInsideInlineClass.kt") + public void testCheckCallingMembersInsideInlineClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); + doTest(fileName); + } + @TestMetadata("computablePropertyInsideInlineClass.kt") public void testComputablePropertyInsideInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); @@ -10353,6 +10383,12 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes doTest(fileName); } + @TestMetadata("inlineClassAsLastExpressionInInLambda.kt") + public void testInlineClassAsLastExpressionInInLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); + doTest(fileName); + } + @TestMetadata("referToPropertyInCompanionObjectOfInlineClass.kt") public void testReferToPropertyInCompanionObjectOfInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 49f6b8cf5d5..070e0bf9f31 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -11301,6 +11301,36 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { doTest(fileName); } + @TestMetadata("checkBoxingAfterAssertionOperator.kt") + public void testCheckBoxingAfterAssertionOperator() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingFromReturnTypeForInlineClasses.kt") + public void testCheckBoxingFromReturnTypeForInlineClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingOnFunctionCalls.kt") + public void testCheckBoxingOnFunctionCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); + doTest(fileName); + } + + @TestMetadata("checkBoxingOnLocalVariableAssignments.kt") + public void testCheckBoxingOnLocalVariableAssignments() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); + doTest(fileName); + } + + @TestMetadata("checkCallingMembersInsideInlineClass.kt") + public void testCheckCallingMembersInsideInlineClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); + doTest(fileName); + } + @TestMetadata("computablePropertyInsideInlineClass.kt") public void testComputablePropertyInsideInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); @@ -11313,6 +11343,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { doTest(fileName); } + @TestMetadata("inlineClassAsLastExpressionInInLambda.kt") + public void testInlineClassAsLastExpressionInInLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); + doTest(fileName); + } + @TestMetadata("referToPropertyInCompanionObjectOfInlineClass.kt") public void testReferToPropertyInCompanionObjectOfInlineClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt");