From 00f61978b87b3ebf7e4acd71a07dd8ae4d73e213 Mon Sep 17 00:00:00 2001 From: Igor Laevsky Date: Fri, 3 Sep 2021 20:46:44 +0300 Subject: [PATCH] WASM: Enable exception handling tests --- .../FirBlackBoxCodegenTestGenerated.java | 6 + .../kt17691WithEnabledFeature.kt | 3 - compiler/testData/codegen/box/arrays/kt503.kt | 5 +- .../codegen/box/binaryOp/divisionByZero.kt | 6 +- .../codegen/box/boxingOptimization/kt5493.kt | 3 +- .../bridges/fakeGenericCovariantOverride.kt | 3 +- .../codegen/box/casts/castGenericNull.kt | 3 +- .../casts/mutableCollections/asWithMutable.kt | 5 +- .../reifiedAsWithMutable.kt | 5 +- .../reifiedSafeAsWithMutable.kt | 5 +- .../mutableCollections/safeAsWithMutable.kt | 5 +- .../testData/codegen/box/classes/kt496.kt | 3 +- .../testData/codegen/box/classes/kt500.kt | 3 +- .../testData/codegen/box/classes/kt501.kt | 3 +- .../capturedVarsOptimization/kt17588.kt | 3 +- .../capturedVarsOptimization/kt45446.kt | 3 +- .../codegen/box/constants/divisionByZero.kt | 5 +- .../breakFromOuter.kt | 3 +- .../breakContinueInExpressions/popSizes.kt | 3 +- .../breakContinueInExpressions/tryFinally1.kt | 3 +- .../breakContinueInExpressions/tryFinally2.kt | 3 +- .../box/controlStructures/breakInFinally.kt | 3 +- .../controlStructures/finallyOnEmptyReturn.kt | 3 +- .../codegen/box/controlStructures/kt14839.kt | 3 +- .../codegen/box/controlStructures/kt15726.kt | 3 +- .../codegen/box/controlStructures/kt1688.kt | 3 +- .../codegen/box/controlStructures/kt2259.kt | 3 +- .../codegen/box/controlStructures/kt2577.kt | 3 +- .../codegen/box/controlStructures/kt628.kt | 3 +- .../codegen/box/controlStructures/kt8148.kt | 3 +- .../box/controlStructures/kt8148_break.kt | 3 +- .../box/controlStructures/kt8148_continue.kt | 3 +- .../codegen/box/controlStructures/kt910.kt | 6 +- .../returnsNothing/inlineMethod.kt | 3 +- .../returnsNothing/tryCatch.kt | 3 +- .../controlStructures/tryCatchExpression.kt | 2 - .../box/controlStructures/tryCatchFinally.kt | 2 - .../controlStructures/tryCatchFinallyChain.kt | 3 +- .../tryCatchInExpressions/catch.kt | 3 +- .../tryCatchInExpressions/complexChain.kt | 3 +- .../tryCatchInExpressions/deadTryCatch.kt | 3 +- .../tryCatchInExpressions/differentTypes.kt | 3 +- .../tryCatchInExpressions/expectException.kt | 3 +- .../tryCatchInExpressions/inlineTryCatch.kt | 3 +- .../tryCatchInExpressions/inlineTryExpr.kt | 3 +- .../tryCatchInExpressions/inlineTryFinally.kt | 3 +- .../tryCatchInExpressions/kt17572.kt | 3 +- .../tryCatchInExpressions/kt17572_2.kt | 3 +- .../tryCatchInExpressions/kt17572_2_ext.kt | 3 +- .../tryCatchInExpressions/kt17572_ext.kt | 3 +- .../tryCatchInExpressions/kt17572_nested.kt | 3 +- .../tryCatchInExpressions/kt17573_nested.kt | 3 +- .../tryCatchInExpressions/kt9644try.kt | 3 +- .../multipleCatchBlocks.kt | 3 +- .../tryCatchInExpressions/splitTry.kt | 3 +- .../tryCatchInExpressions/try.kt | 3 +- .../tryCatchInExpressions/tryAfterTry.kt | 3 +- .../tryCatchInExpressions/tryAndBreak.kt | 3 +- .../tryCatchInExpressions/tryAndContinue.kt | 3 +- .../tryCatchAfterWhileTrue.kt | 3 + .../tryCatchInExpressions/tryInsideCatch.kt | 3 +- .../tryCatchInExpressions/tryInsideTry.kt | 3 +- .../unmatchedInlineMarkers.kt | 3 +- .../box/controlStructures/tryFinally.kt | 2 - .../defaultArguments/useNextParamInLambda.kt | 5 +- .../box/enum/emptyEnumValuesValueOf.kt | 3 +- compiler/testData/codegen/box/enum/valueof.kt | 3 +- .../codegen/box/exclExcl/genericNull.kt | 3 +- .../testData/codegen/box/exclExcl/kt48440.kt | 2 - .../codegen/box/exclExcl/kt48440_2.kt | 2 - .../testData/codegen/box/finally/someStuff.kt | 201 +++++ .../box/functions/coerceVoidToArray.kt | 3 +- .../box/functions/coerceVoidToObject.kt | 3 +- .../codegen/box/functions/invoke/kt3297.kt | 3 +- ...nceToCatchParameterFromLambdaExpression.kt | 3 +- .../boxReturnValueInLambda/kt27586_1.kt | 8 +- .../boxReturnValueInLambda/kt27586_2.kt | 8 +- .../equalsEvaluationOrderInlineClass.kt | 3 +- .../equalsEvaluationOrderNonNull.kt | 3 +- .../equalsEvaluationOrderNullable.kt | 3 +- .../equalsEvaluationOrderPrimitive.kt | 3 +- .../mangledFunctionsPresentInStackTrace.kt | 6 +- .../codegen/box/inlineClasses/kt25771.kt | 3 +- .../inlineClasses/resultRunCatchingOrElse.kt | 5 +- .../intrinsics/trimMarginWithBlankString.kt | 5 +- .../exceptionInFieldInitializer.kt | 3 +- .../box/lazyCodegen/tryCatchExpression.kt | 3 +- .../box/nothingValue/nothingValueException.kt | 5 +- .../codegen/box/objectIntrinsics/objects.kt | 3 +- .../primitiveTypes/nullAsNullableIntIsNull.kt | 3 +- .../properties/lateinit/accessorException.kt | 3 +- .../lateinit/accessorExceptionPublic.kt | 3 +- .../box/properties/lateinit/exceptionField.kt | 3 +- .../properties/lateinit/exceptionGetter.kt | 3 +- .../box/properties/lateinit/kt30548.kt | 3 +- .../box/properties/lateinit/local/kt23260.kt | 5 +- .../uninitializedCapturedMemberAccess.kt | 5 +- .../local/uninitializedCapturedRead.kt | 5 +- .../local/uninitializedMemberAccess.kt | 5 +- .../lateinit/local/uninitializedRead.kt | 5 +- .../box/properties/lateinit/localClass.kt | 3 +- .../properties/lateinit/overrideException.kt | 3 +- .../lateinit/topLevel/accessorException.kt | 6 +- .../topLevel/uninitializedMemberAccess.kt | 5 +- .../lateinit/topLevel/uninitializedRead.kt | 5 +- .../testData/codegen/box/ranges/kt37370.kt | 3 +- .../codegen/box/ranges/unsigned/kt36953.kt | 3 +- .../codegen/box/regressions/kt18779.kt | 3 +- .../codegen/box/regressions/kt3107.kt | 3 +- .../testData/codegen/box/reified/checkcast.kt | 3 +- .../codegen/box/specialBuiltins/throwable.kt | 3 +- .../box/specialBuiltins/throwableComplex.kt | 3 +- .../box/specialBuiltins/throwableImpl.kt | 3 +- .../throwableImplWithSecondaryConstructor.kt | 3 +- .../codegen/box/unsignedTypes/kt47716.kt | 1 - .../codegen/box/when/exceptionOnNoMatch.kt | 3 +- .../codegen/BlackBoxCodegenTestGenerated.java | 6 + .../IrBlackBoxCodegenTestGenerated.java | 6 + .../LightAnalysisModeTestGenerated.java | 5 + .../generators/tests/GenerateJsTests.kt | 3 - .../IrJsCodegenBoxES6TestGenerated.java | 5 + .../IrJsCodegenBoxTestGenerated.java | 5 + .../semantics/JsCodegenBoxTestGenerated.java | 5 + .../IrCodegenBoxWasmTestGenerated.java | 738 +++++++++++++++++- 124 files changed, 1137 insertions(+), 234 deletions(-) create mode 100644 compiler/testData/codegen/box/finally/someStuff.kt diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 002e94013ab..8bc82e60997 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -16000,6 +16000,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/finally/objectInFinally.kt"); } + @Test + @TestMetadata("someStuff.kt") + public void testSomeStuff() throws Exception { + runTest("compiler/testData/codegen/box/finally/someStuff.kt"); + } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { diff --git a/compiler/testData/codegen/box/argumentOrder/kt17691WithEnabledFeature.kt b/compiler/testData/codegen/box/argumentOrder/kt17691WithEnabledFeature.kt index 10849a7411a..48c994256fa 100644 --- a/compiler/testData/codegen/box/argumentOrder/kt17691WithEnabledFeature.kt +++ b/compiler/testData/codegen/box/argumentOrder/kt17691WithEnabledFeature.kt @@ -1,6 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// Doesn't fail on WASM backend if lambdas return Int. Need to investigate futher. -// WASM_MUTE_REASON: UNIT_ISSUES // !LANGUAGE: +UseCorrectExecutionOrderForVarargArguments // WITH_RUNTIME // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/arrays/kt503.kt b/compiler/testData/codegen/box/arrays/kt503.kt index 2d9c71a9f86..ccec459bade 100644 --- a/compiler/testData/codegen/box/arrays/kt503.kt +++ b/compiler/testData/codegen/box/arrays/kt503.kt @@ -1,10 +1,11 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS +// On Wasm we don't currently have ArrayIndexOutOfBoundsException +// IGNORE_BACKEND: WASM + fun iarr(vararg a : Int) = a fun array(vararg a : T) = a diff --git a/compiler/testData/codegen/box/binaryOp/divisionByZero.kt b/compiler/testData/codegen/box/binaryOp/divisionByZero.kt index 1e57e36bb7b..5aeff139693 100644 --- a/compiler/testData/codegen/box/binaryOp/divisionByZero.kt +++ b/compiler/testData/codegen/box/binaryOp/divisionByZero.kt @@ -1,9 +1,9 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // IGNORE_BACKEND: JS -// reason - no error from division by zero in JS +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: IGNORED_IN_JS +// reason - no error from division by zero in JS or WASM fun expectFail(f: () -> Unit): Nothing? { try { diff --git a/compiler/testData/codegen/box/boxingOptimization/kt5493.kt b/compiler/testData/codegen/box/boxingOptimization/kt5493.kt index c0942550ef8..b1d73bfb96a 100644 --- a/compiler/testData/codegen/box/boxingOptimization/kt5493.kt +++ b/compiler/testData/codegen/box/boxingOptimization/kt5493.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box() : String { try { return "OK" diff --git a/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt b/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt index a6c4b35a400..6d9508ec440 100644 --- a/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt +++ b/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // KT-3985 interface Trait { diff --git a/compiler/testData/codegen/box/casts/castGenericNull.kt b/compiler/testData/codegen/box/casts/castGenericNull.kt index 5a4c902f50e..10f44765a88 100644 --- a/compiler/testData/codegen/box/casts/castGenericNull.kt +++ b/compiler/testData/codegen/box/casts/castGenericNull.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun castToString(t: T) { t as String } diff --git a/compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt b/compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt index e7660d91d8c..6c19c0914be 100644 --- a/compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt +++ b/compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt @@ -1,8 +1,9 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: STDLIB_COLLECTIONS + class Itr : Iterator by ArrayList().iterator() class MItr : MutableIterator by ArrayList().iterator() class LItr : ListIterator by ArrayList().listIterator() diff --git a/compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt b/compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt index 0e951a011e7..ef88f0776e4 100644 --- a/compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt +++ b/compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt @@ -1,8 +1,9 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: STDLIB_COLLECTIONS + class Itr : Iterator by ArrayList().iterator() class MItr : MutableIterator by ArrayList().iterator() class LItr : ListIterator by ArrayList().listIterator() diff --git a/compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt b/compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt index c1351775085..6d522250346 100644 --- a/compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt +++ b/compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt @@ -1,8 +1,9 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: STDLIB_COLLECTIONS + class Itr : Iterator by ArrayList().iterator() class MItr : MutableIterator by ArrayList().iterator() class LItr : ListIterator by ArrayList().listIterator() diff --git a/compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt b/compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt index 9b8170dcdc2..fcac852c4fe 100644 --- a/compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt +++ b/compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt @@ -1,8 +1,9 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: STDLIB_COLLECTIONS + class Itr : Iterator by ArrayList().iterator() class MItr : MutableIterator by ArrayList().iterator() class LItr : ListIterator by ArrayList().listIterator() diff --git a/compiler/testData/codegen/box/classes/kt496.kt b/compiler/testData/codegen/box/classes/kt496.kt index 5f84aa5d027..38489ea9cd1 100644 --- a/compiler/testData/codegen/box/classes/kt496.kt +++ b/compiler/testData/codegen/box/classes/kt496.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun test1() : Boolean { try { return true diff --git a/compiler/testData/codegen/box/classes/kt500.kt b/compiler/testData/codegen/box/classes/kt500.kt index da877cec2ef..903daebc811 100644 --- a/compiler/testData/codegen/box/classes/kt500.kt +++ b/compiler/testData/codegen/box/classes/kt500.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + var GUEST_USER_ID = 3 val USER_ID = try { diff --git a/compiler/testData/codegen/box/classes/kt501.kt b/compiler/testData/codegen/box/classes/kt501.kt index 59a9cec5094..5b65e371bb3 100644 --- a/compiler/testData/codegen/box/classes/kt501.kt +++ b/compiler/testData/codegen/box/classes/kt501.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class Reluctant() { init { throw Exception("I'm not coming out") diff --git a/compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt b/compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt index 855183ba152..e4bc9b157e5 100644 --- a/compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt +++ b/compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + //WITH_RUNTIME class Test { diff --git a/compiler/testData/codegen/box/closures/capturedVarsOptimization/kt45446.kt b/compiler/testData/codegen/box/closures/capturedVarsOptimization/kt45446.kt index 1b5ae20d76d..ce25d2c280f 100644 --- a/compiler/testData/codegen/box/closures/capturedVarsOptimization/kt45446.kt +++ b/compiler/testData/codegen/box/closures/capturedVarsOptimization/kt45446.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // This test checks that bytecode optimizer doesn't crash on unreachable code. fun box(): String { diff --git a/compiler/testData/codegen/box/constants/divisionByZero.kt b/compiler/testData/codegen/box/constants/divisionByZero.kt index 49d733d2758..fad46ee48c1 100644 --- a/compiler/testData/codegen/box/constants/divisionByZero.kt +++ b/compiler/testData/codegen/box/constants/divisionByZero.kt @@ -1,9 +1,10 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // IGNORE_BACKEND: JS +// IGNORE_BACKEND: WASM // reason - no error from division by zero in JS +// in wasm we just trap +// WASM_MUTE_REASON: IGNORED_IN_JS fun expectArithmeticException(f: () -> Unit): Boolean { try { diff --git a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt index e609ee7c318..764ad0696f4 100644 --- a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt +++ b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String { OUTER@while (true) { var x = "" diff --git a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt index f12aa92b421..0947cd9e0d8 100644 --- a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt +++ b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun foo(x: Long, y: Int, z: Double, s: String) {} fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt index 0de59561701..b730dbde79c 100644 --- a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt +++ b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String { var x = "OK" while (true) { diff --git a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt index ad57f658fc3..2ee7d5343a7 100644 --- a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt +++ b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String { var r = "" for (i in 1..1) { diff --git a/compiler/testData/codegen/box/controlStructures/breakInFinally.kt b/compiler/testData/codegen/box/controlStructures/breakInFinally.kt index 14422270688..706462318d7 100644 --- a/compiler/testData/codegen/box/controlStructures/breakInFinally.kt +++ b/compiler/testData/codegen/box/controlStructures/breakInFinally.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String { while (true) { try { diff --git a/compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt b/compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt index e17e68c432b..c985970eb35 100644 --- a/compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt +++ b/compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + var result = "Fail" fun foo() { diff --git a/compiler/testData/codegen/box/controlStructures/kt14839.kt b/compiler/testData/codegen/box/controlStructures/kt14839.kt index 13aeb9ed9a0..7404e900564 100644 --- a/compiler/testData/codegen/box/controlStructures/kt14839.kt +++ b/compiler/testData/codegen/box/controlStructures/kt14839.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String { try { } catch (e: Exception) { diff --git a/compiler/testData/codegen/box/controlStructures/kt15726.kt b/compiler/testData/codegen/box/controlStructures/kt15726.kt index 5dfe00d418e..785fac544bd 100644 --- a/compiler/testData/codegen/box/controlStructures/kt15726.kt +++ b/compiler/testData/codegen/box/controlStructures/kt15726.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun nyCompiler() { try { diff --git a/compiler/testData/codegen/box/controlStructures/kt1688.kt b/compiler/testData/codegen/box/controlStructures/kt1688.kt index e7a29fe9d9e..ec92e28b2b0 100644 --- a/compiler/testData/codegen/box/controlStructures/kt1688.kt +++ b/compiler/testData/codegen/box/controlStructures/kt1688.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String { var s = "" try { diff --git a/compiler/testData/codegen/box/controlStructures/kt2259.kt b/compiler/testData/codegen/box/controlStructures/kt2259.kt index 3db1e40f341..2fa639151d8 100644 --- a/compiler/testData/codegen/box/controlStructures/kt2259.kt +++ b/compiler/testData/codegen/box/controlStructures/kt2259.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun foo(args: Array) { try { } finally { diff --git a/compiler/testData/codegen/box/controlStructures/kt2577.kt b/compiler/testData/codegen/box/controlStructures/kt2577.kt index 1ad1d07c1a2..e422d761efd 100644 --- a/compiler/testData/codegen/box/controlStructures/kt2577.kt +++ b/compiler/testData/codegen/box/controlStructures/kt2577.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun foo(): Int { try { } finally { diff --git a/compiler/testData/codegen/box/controlStructures/kt628.kt b/compiler/testData/codegen/box/controlStructures/kt628.kt index f266b8780dc..fb89c053e41 100644 --- a/compiler/testData/codegen/box/controlStructures/kt628.kt +++ b/compiler/testData/codegen/box/controlStructures/kt628.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class A() { fun action() = "OK" diff --git a/compiler/testData/codegen/box/controlStructures/kt8148.kt b/compiler/testData/codegen/box/controlStructures/kt8148.kt index b01ba7c21a1..a38656c00c3 100644 --- a/compiler/testData/codegen/box/controlStructures/kt8148.kt +++ b/compiler/testData/codegen/box/controlStructures/kt8148.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class A(var value: String) fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/kt8148_break.kt b/compiler/testData/codegen/box/controlStructures/kt8148_break.kt index 2bb42f5c4d8..8440880f813 100644 --- a/compiler/testData/codegen/box/controlStructures/kt8148_break.kt +++ b/compiler/testData/codegen/box/controlStructures/kt8148_break.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class A(var value: String) fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/kt8148_continue.kt b/compiler/testData/codegen/box/controlStructures/kt8148_continue.kt index 340200e580a..15ebeb2c51a 100644 --- a/compiler/testData/codegen/box/controlStructures/kt8148_continue.kt +++ b/compiler/testData/codegen/box/controlStructures/kt8148_continue.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class A(var value: String) fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/kt910.kt b/compiler/testData/codegen/box/controlStructures/kt910.kt index a7ac3b9c74d..e62aadc3ece 100644 --- a/compiler/testData/codegen/box/controlStructures/kt910.kt +++ b/compiler/testData/codegen/box/controlStructures/kt910.kt @@ -1,6 +1,8 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // KJS_WITH_FULL_RUNTIME + +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: STDLIB_COLLECTIONS + fun foo() : Int = try { 2 diff --git a/compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt b/compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt index 285109df88d..19c7076cd1b 100644 --- a/compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt +++ b/compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + inline fun exit(): Nothing = null!! fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt b/compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt index d682fc17bcd..8e8ae50d997 100644 --- a/compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt +++ b/compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun exit(): Nothing = null!! fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchExpression.kt b/compiler/testData/codegen/box/controlStructures/tryCatchExpression.kt index 2768f6b3994..65c05f10e64 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchExpression.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchExpression.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: WASM - var log = "" fun foo() { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchFinally.kt b/compiler/testData/codegen/box/controlStructures/tryCatchFinally.kt index 3b15cf71f41..3688a0bbfc8 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchFinally.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchFinally.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: WASM - var log = "" fun foo() { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt b/compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt index f74f2b51303..543d187485a 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box() : String { try { } finally { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt index 24846c6cc2a..81c550bdb0c 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt @@ -1,4 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String = "O" + try { throw Exception("oops!") } catch (e: Exception) { "K" } \ No newline at end of file diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt index 766a0473926..84d4b1c0f22 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun cleanup() {} inline fun concat(x: String, y: String): String = x + y diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt index f5978182d1f..cfc9dba54e5 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + inline fun catchAll(x: String, block: () -> Unit): String { try { block() diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt index 144549076b3..aab79ba471e 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // TODO: muted automatically, investigate should it be ran for JS or not diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt index e3ffb8f1c91..42eed21cac2 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + public inline fun fails(block: () -> Unit): Throwable? { var thrown: Throwable? = null try { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt index 965dbc172a8..69ec84d6a2c 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + inline fun tryOrElse(f1: () -> T, f2: () -> T): T { try { return f1() diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt index d1f5b4bace8..de21fad5772 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + inline fun tryOrElse(f1: () -> T, f2: () -> T): T = try { f1() } catch (e: Exception) { f2() } diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt index f23f45b3608..21948f89fa8 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + inline fun tryAndThen(f1: () -> Unit, f2: () -> Unit, f3: () -> T): T { try { f1() diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt index 4e22044c94e..10c60935ade 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun zap(s: String) = s inline fun tryZap(string: String, fn: (String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt index d7da090cc7e..0aa9d35619f 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun zap(s: String) = s inline fun tryZap(s1: String, s2: String, fn: (String, String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt index d77b99719c6..60592454e4b 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun zap(s: String) = s inline fun tryZap(s1: String, s2: String, fn: String.(String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt index 356e6ffccb6..aa37695954f 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun zap(s: String) = s inline fun tryZap(string: String, fn: String.() -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt index 4393fdcb34a..3a1611ae2f9 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun zap(s: String) = s inline fun tryZap(string: String, fn: (String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt index 05e722de2db..1366a57f31d 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun zap(s: String) = s inline fun tryZap1(string: String, fn: (String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt index b0d8a66022d..d58d99a080f 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + inline fun doCall(f: () -> Any) = f() fun test1() { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt index c871e77a1d9..1d253bbf6cd 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class Exception1(msg: String): Exception(msg) class Exception2(msg: String): Exception(msg) class Exception3(msg: String): Exception(msg) diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt index d8fd2b99ee5..3f41f1a2d51 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + inline fun test(s: () -> Int): Int = try { val i = s() diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt index 9a4ddea1cbc..30dd8c3c93f 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt @@ -1,4 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String = "O" + try { "K" } catch (e: Exception) { "oops!" } \ No newline at end of file diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt index d968a945399..d867976baec 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String = "" + try { "O" } catch (e: Exception) { "1" } + diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt index 24985ca938c..9228f716013 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun idiv(a: Int, b: Int): Int = if (b == 0) throw Exception("Division by zero") else a / b diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt index 960dc8f5879..4f7e40ecc8f 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun idiv(a: Int, b: Int): Int = if (b == 0) throw Exception("Division by zero") else a / b diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt index 885b67601f8..003cd194f83 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt @@ -1,5 +1,8 @@ // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME +// DONT_TARGET_EXACT_BACKEND: WASM +// WASM_MUTE_REASON: STDLIB_COLLECTIONS + fun box(): String { val a = arrayListOf() diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt index 658fbaf3207..6c8fdbf9e73 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String = "O" + try { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt index 026e4475760..156c13e0a2f 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class MyException(message: String): Exception(message) fun box(): String = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt index 4d102c1b537..b0ee70ca41e 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + inline fun catchAll(x: String, block: () -> Unit): String { try { block() diff --git a/compiler/testData/codegen/box/controlStructures/tryFinally.kt b/compiler/testData/codegen/box/controlStructures/tryFinally.kt index 6516d999616..a1c7f1eb8f3 100644 --- a/compiler/testData/codegen/box/controlStructures/tryFinally.kt +++ b/compiler/testData/codegen/box/controlStructures/tryFinally.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: WASM - var log = "" fun foo() { diff --git a/compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt b/compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt index c49f1f3e419..cc2c2e296af 100644 --- a/compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt +++ b/compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt @@ -1,7 +1,6 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED -// IGNORE_BACKEND: JS, JS_IR, NATIVE +// IGNORE_BACKEND: JS, JS_IR, NATIVE, WASM // IGNORE_BACKEND: JS_IR_ES6 +// WASM_MUTE_REASON: IGNORED_IN_JS fun f( f1: () -> String = { f2() }, diff --git a/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt b/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt index b30305d3e52..ca89f7a37d0 100644 --- a/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt +++ b/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + enum class Empty fun box(): String { diff --git a/compiler/testData/codegen/box/enum/valueof.kt b/compiler/testData/codegen/box/enum/valueof.kt index 2cfc7bd1639..f6f7f09c8c0 100644 --- a/compiler/testData/codegen/box/enum/valueof.kt +++ b/compiler/testData/codegen/box/enum/valueof.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + enum class Color { RED, BLUE diff --git a/compiler/testData/codegen/box/exclExcl/genericNull.kt b/compiler/testData/codegen/box/exclExcl/genericNull.kt index 15282c401a1..567c935e693 100644 --- a/compiler/testData/codegen/box/exclExcl/genericNull.kt +++ b/compiler/testData/codegen/box/exclExcl/genericNull.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun foo(t: T) { t!! } diff --git a/compiler/testData/codegen/box/exclExcl/kt48440.kt b/compiler/testData/codegen/box/exclExcl/kt48440.kt index 758513a6ab0..96465d8c7b2 100644 --- a/compiler/testData/codegen/box/exclExcl/kt48440.kt +++ b/compiler/testData/codegen/box/exclExcl/kt48440.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: WASM - fun test(): String { var exception: Throwable? = null val f = { diff --git a/compiler/testData/codegen/box/exclExcl/kt48440_2.kt b/compiler/testData/codegen/box/exclExcl/kt48440_2.kt index 72176014434..d1d9395ac60 100644 --- a/compiler/testData/codegen/box/exclExcl/kt48440_2.kt +++ b/compiler/testData/codegen/box/exclExcl/kt48440_2.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: WASM - fun id(t: T): T = t fun test(b: Boolean): String { diff --git a/compiler/testData/codegen/box/finally/someStuff.kt b/compiler/testData/codegen/box/finally/someStuff.kt new file mode 100644 index 00000000000..79bfc2b36cc --- /dev/null +++ b/compiler/testData/codegen/box/finally/someStuff.kt @@ -0,0 +1,201 @@ +// Tests that are inspired by the stack-related and verifier-related bugs in the wasm backend + +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME + +fun box(): String { + if (!test1()) return "Fail 1" + if (!test2()) return "Fail 2" + if (!test3()) return "Fail 3" + if (!test4()) return "Fail 4" + if (!test5()) return "Fail 5" + if (!test6()) return "Fail 6" + if (!test7()) return "Fail 7" + if (!test8()) return "Fail 8" + return "OK" +} + +open class Foo: Throwable("") {} +class Bar: Foo() {} +class Baz: Foo() {} +class Darb: Throwable("") {} + +fun ooo() { + throw Baz() +} + +fun zoot(): String { + return "str" +} + +// Standard exception handling case without finally +fun test1(): Boolean { + try { + ooo() + } catch (b: Bar) { + throw Darb() + return false + } catch (b: Baz) { + return true + } catch (b: Darb) { + return false + } + + return false +} + +// Standart case with finally +fun test2(): Boolean { + var catched = false + + try { + ooo() + } catch (b: Bar) { + throw Darb() + return false + } catch (b: Baz) { + catched = true + return false + } catch (b: Darb) { + return false + } finally { + return catched + } + + return false +} + + +// Fallthrough with value on the stack (only needs to compile) +fun test3(): Boolean { + try { + 1 + } catch (e: Throwable) { + 2 + } + + return true +} + +// Fallthrough with value on the stack and finally +fun test4(): Boolean { + var seenFinally = false + + try { + ooo() + 2 + } catch (b: Throwable) { + 1 + } finally { + seenFinally = true + } + + return seenFinally +} + +// Try with return value which is used later +fun test5(): Boolean { + val arg = try { + ooo() + 1 + } catch (b: Baz) { + 3 + } catch (b: Darb) { + 4 + } + + return arg == 3 +} + + +// Case where catch uses labeled return which doesn't end the catch +fun foo_for_test6(): String { + var ret = "" + + try { + ooo() + } catch (e: Throwable) { + listOf(1, 2, 3, 4, 5).forEach { + if (it == 3) return@forEach + } + ret += "O" + } finally { + ret += "K" + } + + return ret +} + +fun test6(): Boolean { + return foo_for_test6() == "OK" +} + +// Catch is ended with the loop break into outer loop +fun test7(): Boolean { + var num_exc = 0 + var num_breaks = 0 + var num_finallies = 0 + var num_bodies = 0 + + loop@ for (i in 1..3) { + for (j in 1..5) { + try { + ooo() + } catch (e: Throwable) { + ++num_exc + if (i == 2 || i == 4) { + ++num_breaks + break@loop + } + } finally { + ++num_finallies + } + ++num_bodies + } + } + + if (num_exc == 6 && num_breaks == 1 && num_finallies == 6 && num_bodies == 5) + return true + return false +} + +// Finally throws an exception +class Baobab: Throwable() +class Zanzibar: Throwable() +class Hypo(val catchedBaobab: Boolean, val thrownZanzibar: Boolean, val seenFinally: Boolean): Throwable() + +fun golb() { + throw Baobab() +} + +fun foo(i: Int) { + var catchedBaobab = false + var thrownZanzibar = false + var seenFinally = false + + try { + golb() + } catch (b: Baobab) { + catchedBaobab = true + if (i == 9) { + thrownZanzibar = true + throw Zanzibar() + } + } finally { + seenFinally = true + throw Hypo(catchedBaobab, thrownZanzibar, seenFinally) + } +} + +fun test8(): Boolean { + try { + foo(9) + } catch (z: Hypo) { + if (z.catchedBaobab && z.seenFinally && z.thrownZanzibar) + return true + return false + } catch (e: Throwable) { + return false + } + return false +} diff --git a/compiler/testData/codegen/box/functions/coerceVoidToArray.kt b/compiler/testData/codegen/box/functions/coerceVoidToArray.kt index bde97423b6a..ba2cd8f1f7e 100644 --- a/compiler/testData/codegen/box/functions/coerceVoidToArray.kt +++ b/compiler/testData/codegen/box/functions/coerceVoidToArray.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun a(): IntArray? = null fun b(): Nothing = throw Exception() diff --git a/compiler/testData/codegen/box/functions/coerceVoidToObject.kt b/compiler/testData/codegen/box/functions/coerceVoidToObject.kt index 17452d90e0c..c5244959f60 100644 --- a/compiler/testData/codegen/box/functions/coerceVoidToObject.kt +++ b/compiler/testData/codegen/box/functions/coerceVoidToObject.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun a(): String? = null fun b(): Nothing = throw Exception() diff --git a/compiler/testData/codegen/box/functions/invoke/kt3297.kt b/compiler/testData/codegen/box/functions/invoke/kt3297.kt index 470d628d0c1..f64c679ec1f 100644 --- a/compiler/testData/codegen/box/functions/invoke/kt3297.kt +++ b/compiler/testData/codegen/box/functions/invoke/kt3297.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + //KT-3297 Calling the wrong function inside an extension method to the Function0 class infix fun Function0.or(alt: () -> R): R { diff --git a/compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt b/compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt index 64b6279d9f3..8fac331cdb9 100644 --- a/compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt +++ b/compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun test(): () -> Throwable { return try { TODO() diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt index dd3a6df5e2c..fb03e9ebe0b 100644 --- a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt @@ -1,6 +1,10 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME + +// IGNORE_BACKEND: WASM +// Result::getOrNull contains cast (value as T). It gets inlined but type parameter is not updated. We loose information that it was +// a String and instead we treat it as Any. We then fail to assign it into temporary variable of type String?. +// WASM_MUTE_REASON: TYPE_ISSUES + fun f1(): () -> Result { return { runCatching { diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt index 6f0254f1319..34724f19171 100644 --- a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt @@ -1,6 +1,10 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME + +// IGNORE_BACKEND: WASM +// Result::getOrNull contains cast (value as T). It gets inlined but type parameter is not updated. We loose information that it was +// a String and instead we treat it as Any. We then fail to assign it into temporary variable of type String?. +// WASM_MUTE_REASON: TYPE_ISSUES + fun f1() = lazy { runCatching { "OK" diff --git a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderInlineClass.kt index d849654ec85..206e12625ac 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderInlineClass.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // !LANGUAGE: +InlineClasses inline class Inner(val x: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNonNull.kt b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNonNull.kt index 9568e8d8718..889df868990 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNonNull.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNonNull.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // !LANGUAGE: +InlineClasses inline class A(val x: String = "") diff --git a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullable.kt b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullable.kt index eeca82846f1..70f8702f048 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullable.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullable.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // !LANGUAGE: +InlineClasses inline class A(val x: Any? = null) diff --git a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitive.kt b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitive.kt index 531243a51b7..99518c95ccd 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitive.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitive.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // !LANGUAGE: +InlineClasses inline class A(val x: Int = 0) diff --git a/compiler/testData/codegen/box/inlineClasses/functionNameMangling/mangledFunctionsPresentInStackTrace.kt b/compiler/testData/codegen/box/inlineClasses/functionNameMangling/mangledFunctionsPresentInStackTrace.kt index 8ed45919378..d529c2f29d2 100644 --- a/compiler/testData/codegen/box/inlineClasses/functionNameMangling/mangledFunctionsPresentInStackTrace.kt +++ b/compiler/testData/codegen/box/inlineClasses/functionNameMangling/mangledFunctionsPresentInStackTrace.kt @@ -1,10 +1,10 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND: JS, JS_IR +// IGNORE_BACKEND: JS, JS_IR, WASM // IGNORE_BACKEND: JS_IR_ES6 // FULL_JDK // WITH_RUNTIME +// WASM_MUTE_REASON: IGNORED_IN_JS inline class Id(val id: String) diff --git a/compiler/testData/codegen/box/inlineClasses/kt25771.kt b/compiler/testData/codegen/box/inlineClasses/kt25771.kt index 69f84752912..29197919704 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt25771.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt25771.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // !LANGUAGE: +InlineClasses inline class Result(val value: Any?) { diff --git a/compiler/testData/codegen/box/inlineClasses/resultRunCatchingOrElse.kt b/compiler/testData/codegen/box/inlineClasses/resultRunCatchingOrElse.kt index 6c014fe77ef..7ac24bd4cdc 100644 --- a/compiler/testData/codegen/box/inlineClasses/resultRunCatchingOrElse.kt +++ b/compiler/testData/codegen/box/inlineClasses/resultRunCatchingOrElse.kt @@ -1,5 +1,6 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: TYPE_ISSUES + inline class Result(val value: Any?) { fun exceptionOrNull(): Throwable? = when (value) { diff --git a/compiler/testData/codegen/box/intrinsics/trimMarginWithBlankString.kt b/compiler/testData/codegen/box/intrinsics/trimMarginWithBlankString.kt index 2238cdca26a..43e2ac56cd3 100644 --- a/compiler/testData/codegen/box/intrinsics/trimMarginWithBlankString.kt +++ b/compiler/testData/codegen/box/intrinsics/trimMarginWithBlankString.kt @@ -1,8 +1,9 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME // KJS_WITH_FULL_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: STDLIB_TEXT + fun box(): String { try { "a b c".trimMargin(" ") diff --git a/compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt b/compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt index 4104557fbe6..b3df7b0def1 100644 --- a/compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt +++ b/compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class A(val p: String) { val prop: String = throw RuntimeException() } diff --git a/compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt b/compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt index 13a575ecf26..b71a56266b4 100644 --- a/compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt +++ b/compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class A { val p : Int = try{ 1 diff --git a/compiler/testData/codegen/box/nothingValue/nothingValueException.kt b/compiler/testData/codegen/box/nothingValue/nothingValueException.kt index 25c4469ac1f..91354f7a382 100644 --- a/compiler/testData/codegen/box/nothingValue/nothingValueException.kt +++ b/compiler/testData/codegen/box/nothingValue/nothingValueException.kt @@ -1,7 +1,8 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // IGNORE_BACKEND: JS +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + fun something(): T = Any() as T class Context diff --git a/compiler/testData/codegen/box/objectIntrinsics/objects.kt b/compiler/testData/codegen/box/objectIntrinsics/objects.kt index dc3bb8738aa..1f308efadae 100644 --- a/compiler/testData/codegen/box/objectIntrinsics/objects.kt +++ b/compiler/testData/codegen/box/objectIntrinsics/objects.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + package foo fun box(): String { diff --git a/compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt b/compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt index e30c1d3aadd..119153e459b 100644 --- a/compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt +++ b/compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String { try { if ((null as Int?)!! == 10) return "Fail #1" diff --git a/compiler/testData/codegen/box/properties/lateinit/accessorException.kt b/compiler/testData/codegen/box/properties/lateinit/accessorException.kt index 19eb4747432..921e4fc2dff 100644 --- a/compiler/testData/codegen/box/properties/lateinit/accessorException.kt +++ b/compiler/testData/codegen/box/properties/lateinit/accessorException.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + public class A { fun getFromClass(): Boolean { try { diff --git a/compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt b/compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt index 142f9165e69..3b1bbecd51e 100644 --- a/compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt +++ b/compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun eval(fn: () -> T) = fn() public class A { diff --git a/compiler/testData/codegen/box/properties/lateinit/exceptionField.kt b/compiler/testData/codegen/box/properties/lateinit/exceptionField.kt index 4e8b24630d4..203e62dcd40 100644 --- a/compiler/testData/codegen/box/properties/lateinit/exceptionField.kt +++ b/compiler/testData/codegen/box/properties/lateinit/exceptionField.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class A { private lateinit var str: String diff --git a/compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt b/compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt index 1b8c960328e..8a442d69f1c 100644 --- a/compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt +++ b/compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class A { public lateinit var str: String } diff --git a/compiler/testData/codegen/box/properties/lateinit/kt30548.kt b/compiler/testData/codegen/box/properties/lateinit/kt30548.kt index 994f2a7a1d1..d355d24a1ab 100644 --- a/compiler/testData/codegen/box/properties/lateinit/kt30548.kt +++ b/compiler/testData/codegen/box/properties/lateinit/kt30548.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // IGNORE_BACKEND: JVM class Test { diff --git a/compiler/testData/codegen/box/properties/lateinit/local/kt23260.kt b/compiler/testData/codegen/box/properties/lateinit/local/kt23260.kt index 246cd4f44cb..ca42d3845dd 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/kt23260.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/kt23260.kt @@ -1,8 +1,9 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + fun box(): String { lateinit var str: String try { diff --git a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt index c390ea80d87..41999e6b919 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt @@ -1,7 +1,8 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + import kotlin.UninitializedPropertyAccessException fun runNoInline(f: () -> Unit) = f() diff --git a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt index 8fb7dba2e16..baafb4cbf4d 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt @@ -1,7 +1,8 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + import kotlin.UninitializedPropertyAccessException fun runNoInline(f: () -> Unit) = f() diff --git a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt index e115e5dad5e..f8d260ebc7e 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt @@ -1,7 +1,8 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + import kotlin.UninitializedPropertyAccessException fun box(): String { diff --git a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt index 4e5c97f7a23..aa2888302ef 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt @@ -1,7 +1,8 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + import kotlin.UninitializedPropertyAccessException fun box(): String { diff --git a/compiler/testData/codegen/box/properties/lateinit/localClass.kt b/compiler/testData/codegen/box/properties/lateinit/localClass.kt index 6a53283de4e..5f4d02e80a6 100644 --- a/compiler/testData/codegen/box/properties/lateinit/localClass.kt +++ b/compiler/testData/codegen/box/properties/lateinit/localClass.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // WITH_RUNTIME import kotlin.UninitializedPropertyAccessException diff --git a/compiler/testData/codegen/box/properties/lateinit/overrideException.kt b/compiler/testData/codegen/box/properties/lateinit/overrideException.kt index 438ab58eb7c..d006347094b 100644 --- a/compiler/testData/codegen/box/properties/lateinit/overrideException.kt +++ b/compiler/testData/codegen/box/properties/lateinit/overrideException.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + interface Intf { val str: String } diff --git a/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt b/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt index 704530d3200..d4b30d811eb 100644 --- a/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt +++ b/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt @@ -1,7 +1,9 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + // FILE: lateinit.kt + private lateinit var s: String object C { diff --git a/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt b/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt index 6a668e76795..7a33dda8bf9 100644 --- a/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt +++ b/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt @@ -1,7 +1,8 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + import kotlin.UninitializedPropertyAccessException lateinit var str: String diff --git a/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt b/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt index f8ae570e96d..9f4c900259e 100644 --- a/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt +++ b/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt @@ -1,7 +1,8 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED // WITH_RUNTIME +// IGNORE_BACKEND: WASM +// WASM_MUTE_REASON: REFLECTION + import kotlin.UninitializedPropertyAccessException lateinit var str: String diff --git a/compiler/testData/codegen/box/ranges/kt37370.kt b/compiler/testData/codegen/box/ranges/kt37370.kt index cb347b1e2b4..aa8bafa1b11 100644 --- a/compiler/testData/codegen/box/ranges/kt37370.kt +++ b/compiler/testData/codegen/box/ranges/kt37370.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // WITH_RUNTIME fun testContinue1() { diff --git a/compiler/testData/codegen/box/ranges/unsigned/kt36953.kt b/compiler/testData/codegen/box/ranges/unsigned/kt36953.kt index 64a6a6210ef..1a53dfe46b4 100644 --- a/compiler/testData/codegen/box/ranges/unsigned/kt36953.kt +++ b/compiler/testData/codegen/box/ranges/unsigned/kt36953.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // WITH_RUNTIME // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/regressions/kt18779.kt b/compiler/testData/codegen/box/regressions/kt18779.kt index 228b827bb4e..58c2989fccd 100644 --- a/compiler/testData/codegen/box/regressions/kt18779.kt +++ b/compiler/testData/codegen/box/regressions/kt18779.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + sealed class Result { class Failure(val exception: Exception) : Result() diff --git a/compiler/testData/codegen/box/regressions/kt3107.kt b/compiler/testData/codegen/box/regressions/kt3107.kt index a7af15e5592..f1bc4e1366a 100644 --- a/compiler/testData/codegen/box/regressions/kt3107.kt +++ b/compiler/testData/codegen/box/regressions/kt3107.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun foo(): String { val s = try { "OK" diff --git a/compiler/testData/codegen/box/reified/checkcast.kt b/compiler/testData/codegen/box/reified/checkcast.kt index 7c534d47c4a..97b2be3611e 100644 --- a/compiler/testData/codegen/box/reified/checkcast.kt +++ b/compiler/testData/codegen/box/reified/checkcast.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/specialBuiltins/throwable.kt b/compiler/testData/codegen/box/specialBuiltins/throwable.kt index c6b5f4770e5..42c0d382113 100644 --- a/compiler/testData/codegen/box/specialBuiltins/throwable.kt +++ b/compiler/testData/codegen/box/specialBuiltins/throwable.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun box(): String { try { throw Throwable("OK", null) diff --git a/compiler/testData/codegen/box/specialBuiltins/throwableComplex.kt b/compiler/testData/codegen/box/specialBuiltins/throwableComplex.kt index 9fa821dd303..a9c962b6dea 100644 --- a/compiler/testData/codegen/box/specialBuiltins/throwableComplex.kt +++ b/compiler/testData/codegen/box/specialBuiltins/throwableComplex.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // Super calls to Throwable properties are not supported // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 diff --git a/compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt b/compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt index 120ddbba4a6..f7f4706e2a4 100644 --- a/compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt +++ b/compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + // Super calls to Throwable properties are not supported // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 diff --git a/compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt b/compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt index 785989e1ccb..e0b6553e83c 100644 --- a/compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt +++ b/compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + class MyThrowable : Throwable { val x: String diff --git a/compiler/testData/codegen/box/unsignedTypes/kt47716.kt b/compiler/testData/codegen/box/unsignedTypes/kt47716.kt index 1e3a6c46bae..113c0bfb4e2 100644 --- a/compiler/testData/codegen/box/unsignedTypes/kt47716.kt +++ b/compiler/testData/codegen/box/unsignedTypes/kt47716.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: WASM // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/when/exceptionOnNoMatch.kt b/compiler/testData/codegen/box/when/exceptionOnNoMatch.kt index a2b7d5348a9..cc2507f82ef 100644 --- a/compiler/testData/codegen/box/when/exceptionOnNoMatch.kt +++ b/compiler/testData/codegen/box/when/exceptionOnNoMatch.kt @@ -1,5 +1,4 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED + fun isZero(x: Int) = when(x) { 0 -> true else -> throw Exception() diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index f3296d12447..513fb08c448 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -15922,6 +15922,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/finally/objectInFinally.kt"); } + @Test + @TestMetadata("someStuff.kt") + public void testSomeStuff() throws Exception { + runTest("compiler/testData/codegen/box/finally/someStuff.kt"); + } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 89f89bc145c..1143cb40e22 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -16000,6 +16000,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/finally/objectInFinally.kt"); } + @Test + @TestMetadata("someStuff.kt") + public void testSomeStuff() throws Exception { + runTest("compiler/testData/codegen/box/finally/someStuff.kt"); + } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 9d56c452fb7..2611be90927 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -13108,6 +13108,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/finally/objectInFinally.kt"); } + @TestMetadata("someStuff.kt") + public void testSomeStuff() throws Exception { + runTest("compiler/testData/codegen/box/finally/someStuff.kt"); + } + @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt index 6ec1f8d2988..7830bbf2902 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt @@ -103,9 +103,6 @@ fun main(args: Array) { // TODO: Support coroutines "coroutines", "parametersMetadata", - // TODO: Support exceptions - "finally", "deadCodeElimination", "controlStructures/tryCatchInExpressions", - // TODO: Support delegated properties "delegatedProperty", diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index ad6ec92b956..8098a67d553 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -11622,6 +11622,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/finally/objectInFinally.kt"); } + @TestMetadata("someStuff.kt") + public void testSomeStuff() throws Exception { + runTest("compiler/testData/codegen/box/finally/someStuff.kt"); + } + @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 2b2ea6af153..93b136dedfc 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -11028,6 +11028,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/finally/objectInFinally.kt"); } + @TestMetadata("someStuff.kt") + public void testSomeStuff() throws Exception { + runTest("compiler/testData/codegen/box/finally/someStuff.kt"); + } + @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 6b019b9b8d0..3c71c17454c 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -11008,6 +11008,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/finally/objectInFinally.kt"); } + @TestMetadata("someStuff.kt") + public void testSomeStuff() throws Exception { + runTest("compiler/testData/codegen/box/finally/someStuff.kt"); + } + @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index 87d26d2e607..b38596f2f63 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -27,7 +27,7 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } public void testAllFilesPresentInBox() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true, "toArray", "classLiteral", "reflection", "contracts", "platformTypes", "ranges/stepped/unsigned", "coroutines", "parametersMetadata", "finally", "deadCodeElimination", "controlStructures/tryCatchInExpressions", "delegatedProperty", "compileKotlinAgainstKotlin", "testsWithJava9", "testsWithJava15", "testsWithJava17"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true, "toArray", "classLiteral", "reflection", "contracts", "platformTypes", "ranges/stepped/unsigned", "coroutines", "parametersMetadata", "delegatedProperty", "compileKotlinAgainstKotlin", "testsWithJava9", "testsWithJava15", "testsWithJava17"); } @TestMetadata("compiler/testData/codegen/box/annotations") @@ -215,6 +215,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); } + @TestMetadata("kt17691WithEnabledFeature.kt") + public void testKt17691WithEnabledFeature() throws Exception { + runTest("compiler/testData/codegen/box/argumentOrder/kt17691WithEnabledFeature.kt"); + } + @TestMetadata("kt9277.kt") public void testKt9277() throws Exception { runTest("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); @@ -458,6 +463,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/arrays/kt4357.kt"); } + @TestMetadata("kt503.kt") + public void testKt503() throws Exception { + runTest("compiler/testData/codegen/box/arrays/kt503.kt"); + } + @TestMetadata("kt594.kt") public void testKt594() throws Exception { runTest("compiler/testData/codegen/box/arrays/kt594.kt"); @@ -742,6 +752,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); } + @TestMetadata("divisionByZero.kt") + public void testDivisionByZero() throws Exception { + runTest("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); + } + @TestMetadata("eqNullableDoubles.kt") public void testEqNullableDoubles() throws Exception { runTest("compiler/testData/codegen/box/binaryOp/eqNullableDoubles.kt"); @@ -915,6 +930,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/boxingOptimization/kt48394.kt"); } + @TestMetadata("kt5493.kt") + public void testKt5493() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); + } + @TestMetadata("kt5588.kt") public void testKt5588() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); @@ -1028,6 +1048,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); } + @TestMetadata("fakeGenericCovariantOverride.kt") + public void testFakeGenericCovariantOverride() throws Exception { + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); + } + @TestMetadata("fakeGenericCovariantOverrideWithDelegation.kt") public void testFakeGenericCovariantOverrideWithDelegation() throws Exception { runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); @@ -1931,6 +1956,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/casts/asUnit.kt"); } + @TestMetadata("castGenericNull.kt") + public void testCastGenericNull() throws Exception { + runTest("compiler/testData/codegen/box/casts/castGenericNull.kt"); + } + @TestMetadata("intersectionTypeMultipleBounds.kt") public void testIntersectionTypeMultipleBounds() throws Exception { runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); @@ -2071,6 +2101,26 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testAllFilesPresentInMutableCollections() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/mutableCollections"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + + @TestMetadata("asWithMutable.kt") + public void testAsWithMutable() throws Exception { + runTest("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); + } + + @TestMetadata("reifiedAsWithMutable.kt") + public void testReifiedAsWithMutable() throws Exception { + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); + } + + @TestMetadata("reifiedSafeAsWithMutable.kt") + public void testReifiedSafeAsWithMutable() throws Exception { + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); + } + + @TestMetadata("safeAsWithMutable.kt") + public void testSafeAsWithMutable() throws Exception { + runTest("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); + } } } @@ -2434,6 +2484,21 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/classes/kt48.kt"); } + @TestMetadata("kt496.kt") + public void testKt496() throws Exception { + runTest("compiler/testData/codegen/box/classes/kt496.kt"); + } + + @TestMetadata("kt500.kt") + public void testKt500() throws Exception { + runTest("compiler/testData/codegen/box/classes/kt500.kt"); + } + + @TestMetadata("kt501.kt") + public void testKt501() throws Exception { + runTest("compiler/testData/codegen/box/classes/kt501.kt"); + } + @TestMetadata("kt504.kt") public void testKt504() throws Exception { runTest("compiler/testData/codegen/box/classes/kt504.kt"); @@ -3073,11 +3138,21 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); } + @TestMetadata("kt17588.kt") + public void testKt17588() throws Exception { + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); + } + @TestMetadata("kt44347.kt") public void testKt44347() throws Exception { runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt44347.kt"); } + @TestMetadata("kt45446.kt") + public void testKt45446() throws Exception { + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt45446.kt"); + } + @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); @@ -3232,6 +3307,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/constants/constantsInWhen.kt"); } + @TestMetadata("divisionByZero.kt") + public void testDivisionByZero() throws Exception { + runTest("compiler/testData/codegen/box/constants/divisionByZero.kt"); + } + @TestMetadata("foldingBinaryOpsUnsigned.kt") public void testFoldingBinaryOpsUnsigned() throws Exception { runTest("compiler/testData/codegen/box/constants/foldingBinaryOpsUnsigned.kt"); @@ -3288,7 +3368,7 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } public void testAllFilesPresentInControlStructures() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true, "tryCatchInExpressions"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } @TestMetadata("bottles.kt") @@ -3296,6 +3376,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/bottles.kt"); } + @TestMetadata("breakInFinally.kt") + public void testBreakInFinally() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); + } + @TestMetadata("breakInWhen.kt") public void testBreakInWhen() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/breakInWhen.kt"); @@ -3361,6 +3446,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); } + @TestMetadata("finallyOnEmptyReturn.kt") + public void testFinallyOnEmptyReturn() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); + } + @TestMetadata("forInCharSequenceMut.kt") public void testForInCharSequenceMut() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); @@ -3421,6 +3511,21 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/kt1441.kt"); } + @TestMetadata("kt14839.kt") + public void testKt14839() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt14839.kt"); + } + + @TestMetadata("kt15726.kt") + public void testKt15726() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt15726.kt"); + } + + @TestMetadata("kt1688.kt") + public void testKt1688() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt1688.kt"); + } + @TestMetadata("kt17110.kt") public void testKt17110() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/kt17110.kt"); @@ -3451,6 +3556,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/kt2147.kt"); } + @TestMetadata("kt2259.kt") + public void testKt2259() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt2259.kt"); + } + @TestMetadata("kt2291.kt") public void testKt2291() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/kt2291.kt"); @@ -3461,6 +3571,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/kt2416.kt"); } + @TestMetadata("kt2577.kt") + public void testKt2577() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt2577.kt"); + } + @TestMetadata("kt2597.kt") public void testKt2597() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/kt2597.kt"); @@ -3511,6 +3626,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/kt47245.kt"); } + @TestMetadata("kt628.kt") + public void testKt628() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt628.kt"); + } + @TestMetadata("kt772.kt") public void testKt772() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/kt772.kt"); @@ -3521,6 +3641,21 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/kt773.kt"); } + @TestMetadata("kt8148.kt") + public void testKt8148() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt8148.kt"); + } + + @TestMetadata("kt8148_break.kt") + public void testKt8148_break() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); + } + + @TestMetadata("kt8148_continue.kt") + public void testKt8148_continue() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); + } + @TestMetadata("kt870.kt") public void testKt870() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/kt870.kt"); @@ -3536,6 +3671,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); } + @TestMetadata("kt910.kt") + public void testKt910() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/kt910.kt"); + } + @TestMetadata("kt958.kt") public void testKt958() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/kt958.kt"); @@ -3571,6 +3711,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/tryCatchFinally.kt"); } + @TestMetadata("tryCatchFinallyChain.kt") + public void testTryCatchFinallyChain() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); + } + @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/tryFinally.kt"); @@ -3588,6 +3733,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("breakFromOuter.kt") + public void testBreakFromOuter() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); + } + @TestMetadata("breakInDoWhile.kt") public void testBreakInDoWhile() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); @@ -3658,6 +3808,21 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); } + @TestMetadata("popSizes.kt") + public void testPopSizes() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); + } + + @TestMetadata("tryFinally1.kt") + public void testTryFinally1() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); + } + + @TestMetadata("tryFinally2.kt") + public void testTryFinally2() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); + } + @TestMetadata("whileTrueBreak.kt") public void testWhileTrueBreak() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); @@ -3791,16 +3956,189 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); } + @TestMetadata("inlineMethod.kt") + public void testInlineMethod() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); + } + @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); } + @TestMetadata("tryCatch.kt") + public void testTryCatch() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); + } + @TestMetadata("when.kt") public void testWhen() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TryCatchInExpressions extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInTryCatchInExpressions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("catch.kt") + public void testCatch() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); + } + + @TestMetadata("complexChain.kt") + public void testComplexChain() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); + } + + @TestMetadata("deadTryCatch.kt") + public void testDeadTryCatch() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); + } + + @TestMetadata("differentTypes.kt") + public void testDifferentTypes() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); + } + + @TestMetadata("expectException.kt") + public void testExpectException() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); + } + + @TestMetadata("finally.kt") + public void testFinally() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); + } + + @TestMetadata("inlineTryCatch.kt") + public void testInlineTryCatch() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); + } + + @TestMetadata("inlineTryExpr.kt") + public void testInlineTryExpr() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); + } + + @TestMetadata("inlineTryFinally.kt") + public void testInlineTryFinally() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); + } + + @TestMetadata("kt17572.kt") + public void testKt17572() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); + } + + @TestMetadata("kt17572_2.kt") + public void testKt17572_2() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); + } + + @TestMetadata("kt17572_2_ext.kt") + public void testKt17572_2_ext() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); + } + + @TestMetadata("kt17572_ext.kt") + public void testKt17572_ext() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); + } + + @TestMetadata("kt17572_nested.kt") + public void testKt17572_nested() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); + } + + @TestMetadata("kt17573.kt") + public void testKt17573() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); + } + + @TestMetadata("kt17573_nested.kt") + public void testKt17573_nested() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); + } + + @TestMetadata("kt8608.kt") + public void testKt8608() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); + } + + @TestMetadata("kt9644try.kt") + public void testKt9644try() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); + } + + @TestMetadata("multipleCatchBlocks.kt") + public void testMultipleCatchBlocks() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); + } + + @TestMetadata("nonLocalReturnInTryFinally.kt") + public void testNonLocalReturnInTryFinally() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/nonLocalReturnInTryFinally.kt"); + } + + @TestMetadata("splitTry.kt") + public void testSplitTry() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); + } + + @TestMetadata("splitTryCorner1.kt") + public void testSplitTryCorner1() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); + } + + @TestMetadata("splitTryCorner2.kt") + public void testSplitTryCorner2() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); + } + + @TestMetadata("try.kt") + public void testTry() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); + } + + @TestMetadata("tryAfterTry.kt") + public void testTryAfterTry() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); + } + + @TestMetadata("tryAndBreak.kt") + public void testTryAndBreak() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); + } + + @TestMetadata("tryAndContinue.kt") + public void testTryAndContinue() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); + } + + @TestMetadata("tryInsideCatch.kt") + public void testTryInsideCatch() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); + } + + @TestMetadata("tryInsideTry.kt") + public void testTryInsideTry() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); + } + + @TestMetadata("unmatchedInlineMarkers.kt") + public void testUnmatchedInlineMarkers() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/dataClasses") @@ -4078,6 +4416,39 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/deadCodeElimination") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DeadCodeElimination extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInDeadCodeElimination() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("emptyVariableRange.kt") + public void testEmptyVariableRange() throws Exception { + runTest("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); + } + + @TestMetadata("intersectingVariableRange.kt") + public void testIntersectingVariableRange() throws Exception { + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); + } + + @TestMetadata("intersectingVariableRangeInFinally.kt") + public void testIntersectingVariableRangeInFinally() throws Exception { + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); + } + + @TestMetadata("kt14357.kt") + public void testKt14357() throws Exception { + runTest("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/defaultArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -4165,6 +4536,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); } + @TestMetadata("useNextParamInLambda.kt") + public void testUseNextParamInLambda() throws Exception { + runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt"); + } + @TestMetadata("useThisInLambda.kt") public void testUseThisInLambda() throws Exception { runTest("compiler/testData/codegen/box/defaultArguments/useThisInLambda.kt"); @@ -5019,6 +5395,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/enum/emptyConstructor.kt"); } + @TestMetadata("emptyEnumValuesValueOf.kt") + public void testEmptyEnumValuesValueOf() throws Exception { + runTest("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); + } + @TestMetadata("enumConstructorParameterClashWithDefaults.kt") public void testEnumConstructorParameterClashWithDefaults() throws Exception { runTest("compiler/testData/codegen/box/enum/enumConstructorParameterClashWithDefaults.kt"); @@ -5269,6 +5650,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/enum/toString.kt"); } + @TestMetadata("valueof.kt") + public void testValueof() throws Exception { + runTest("compiler/testData/codegen/box/enum/valueof.kt"); + } + @TestMetadata("whenInObject.kt") public void testWhenInObject() throws Exception { runTest("compiler/testData/codegen/box/enum/whenInObject.kt"); @@ -5348,6 +5734,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/exclExcl"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("genericNull.kt") + public void testGenericNull() throws Exception { + runTest("compiler/testData/codegen/box/exclExcl/genericNull.kt"); + } + @TestMetadata("kt48440.kt") public void testKt48440() throws Exception { runTest("compiler/testData/codegen/box/exclExcl/kt48440.kt"); @@ -5649,6 +6040,129 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/finally") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Finally extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInFinally() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("breakAndOuterFinally.kt") + public void testBreakAndOuterFinally() throws Exception { + runTest("compiler/testData/codegen/box/finally/breakAndOuterFinally.kt"); + } + + @TestMetadata("continueAndOuterFinally.kt") + public void testContinueAndOuterFinally() throws Exception { + runTest("compiler/testData/codegen/box/finally/continueAndOuterFinally.kt"); + } + + @TestMetadata("finallyAndFinally.kt") + public void testFinallyAndFinally() throws Exception { + runTest("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); + } + + @TestMetadata("kt31923_break.kt") + public void testKt31923_break() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt31923_break.kt"); + } + + @TestMetadata("kt31923_continue.kt") + public void testKt31923_continue() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt31923_continue.kt"); + } + + @TestMetadata("kt31923_return.kt") + public void testKt31923_return() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt31923_return.kt"); + } + + @TestMetadata("kt3549.kt") + public void testKt3549() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt3549.kt"); + } + + @TestMetadata("kt3706.kt") + public void testKt3706() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt3706.kt"); + } + + @TestMetadata("kt3867.kt") + public void testKt3867() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt3867.kt"); + } + + @TestMetadata("kt3874.kt") + public void testKt3874() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt3874.kt"); + } + + @TestMetadata("kt3894.kt") + public void testKt3894() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt3894.kt"); + } + + @TestMetadata("kt4134.kt") + public void testKt4134() throws Exception { + runTest("compiler/testData/codegen/box/finally/kt4134.kt"); + } + + @TestMetadata("loopAndFinally.kt") + public void testLoopAndFinally() throws Exception { + runTest("compiler/testData/codegen/box/finally/loopAndFinally.kt"); + } + + @TestMetadata("nestedFinallyAndNonFinallyTry.kt") + public void testNestedFinallyAndNonFinallyTry() throws Exception { + runTest("compiler/testData/codegen/box/finally/nestedFinallyAndNonFinallyTry.kt"); + } + + @TestMetadata("nestedFinallyAndNonFinallyTry2.kt") + public void testNestedFinallyAndNonFinallyTry2() throws Exception { + runTest("compiler/testData/codegen/box/finally/nestedFinallyAndNonFinallyTry2.kt"); + } + + @TestMetadata("nestedFinallyAndNonFinallyTry3.kt") + public void testNestedFinallyAndNonFinallyTry3() throws Exception { + runTest("compiler/testData/codegen/box/finally/nestedFinallyAndNonFinallyTry3.kt"); + } + + @TestMetadata("nestedFinallyAndNonFinallyTry4.kt") + public void testNestedFinallyAndNonFinallyTry4() throws Exception { + runTest("compiler/testData/codegen/box/finally/nestedFinallyAndNonFinallyTry4.kt"); + } + + @TestMetadata("notChainCatch.kt") + public void testNotChainCatch() throws Exception { + runTest("compiler/testData/codegen/box/finally/notChainCatch.kt"); + } + + @TestMetadata("objectInFinally.kt") + public void testObjectInFinally() throws Exception { + runTest("compiler/testData/codegen/box/finally/objectInFinally.kt"); + } + + @TestMetadata("someStuff.kt") + public void testSomeStuff() throws Exception { + runTest("compiler/testData/codegen/box/finally/someStuff.kt"); + } + + @TestMetadata("tryFinally.kt") + public void testTryFinally() throws Exception { + runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); + } + + @TestMetadata("tryLoopTry.kt") + public void testTryLoopTry() throws Exception { + runTest("compiler/testData/codegen/box/finally/tryLoopTry.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/fir") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -5779,6 +6293,16 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("coerceVoidToArray.kt") + public void testCoerceVoidToArray() throws Exception { + runTest("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); + } + + @TestMetadata("coerceVoidToObject.kt") + public void testCoerceVoidToObject() throws Exception { + runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); + } + @TestMetadata("defaultargs.kt") public void testDefaultargs() throws Exception { runTest("compiler/testData/codegen/box/functions/defaultargs.kt"); @@ -6087,6 +6611,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); } + @TestMetadata("kt3297.kt") + public void testKt3297() throws Exception { + runTest("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); + } + @TestMetadata("kt3450getAndInvoke.kt") public void testKt3450getAndInvoke() throws Exception { runTest("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); @@ -6708,6 +7237,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inference/recursiveConstraintInsideTypeArgumentWithStarProjection.kt"); } + @TestMetadata("referenceToCatchParameterFromLambdaExpression.kt") + public void testReferenceToCatchParameterFromLambdaExpression() throws Exception { + runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt"); + } + @TestMetadata("sumOfOverloads.kt") public void testSumOfOverloads() throws Exception { runTest("compiler/testData/codegen/box/inference/sumOfOverloads.kt"); @@ -7062,6 +7596,26 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/equalsCallsLeftArgument.kt"); } + @TestMetadata("equalsEvaluationOrderInlineClass.kt") + public void testEqualsEvaluationOrderInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderInlineClass.kt"); + } + + @TestMetadata("equalsEvaluationOrderNonNull.kt") + public void testEqualsEvaluationOrderNonNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNonNull.kt"); + } + + @TestMetadata("equalsEvaluationOrderNullable.kt") + public void testEqualsEvaluationOrderNullable() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullable.kt"); + } + + @TestMetadata("equalsEvaluationOrderPrimitive.kt") + public void testEqualsEvaluationOrderPrimitive() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitive.kt"); + } + @TestMetadata("equalsOperatorWithGenericCall.kt") public void testEqualsOperatorWithGenericCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/equalsOperatorWithGenericCall.kt"); @@ -7202,6 +7756,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/kt25246.kt"); } + @TestMetadata("kt25771.kt") + public void testKt25771() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt25771.kt"); + } + @TestMetadata("kt26103.kt") public void testKt26103() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt26103.kt"); @@ -7442,6 +8001,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/resultInlining.kt"); } + @TestMetadata("resultRunCatchingOrElse.kt") + public void testResultRunCatchingOrElse() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/resultRunCatchingOrElse.kt"); + } + @TestMetadata("safeAsOfTypeParameterWithInlineClassBound.kt") public void testSafeAsOfTypeParameterWithInlineClassBound() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/safeAsOfTypeParameterWithInlineClassBound.kt"); @@ -7593,6 +8157,16 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testBoxString() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt"); } + + @TestMetadata("kt27586_1.kt") + public void testKt27586_1() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt"); + } + + @TestMetadata("kt27586_2.kt") + public void testKt27586_2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt"); + } } @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @@ -8098,6 +8672,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/functionNameMangling/mangledFunctionsDoNotClash.kt"); } + @TestMetadata("mangledFunctionsPresentInStackTrace.kt") + public void testMangledFunctionsPresentInStackTrace() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/functionNameMangling/mangledFunctionsPresentInStackTrace.kt"); + } + @TestMetadata("mixedSignatureFunctionsDoNotClash.kt") public void testMixedSignatureFunctionsDoNotClash() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/functionNameMangling/mixedSignatureFunctionsDoNotClash.kt"); @@ -8962,6 +9541,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testTostring() throws Exception { runTest("compiler/testData/codegen/box/intrinsics/tostring.kt"); } + + @TestMetadata("trimMarginWithBlankString.kt") + public void testTrimMarginWithBlankString() throws Exception { + runTest("compiler/testData/codegen/box/intrinsics/trimMarginWithBlankString.kt"); + } } @TestMetadata("compiler/testData/codegen/box/invokedynamic") @@ -9782,6 +10366,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("exceptionInFieldInitializer.kt") + public void testExceptionInFieldInitializer() throws Exception { + runTest("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); + } + @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { runTest("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); @@ -9807,6 +10396,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/lazyCodegen/toString.kt"); } + @TestMetadata("tryCatchExpression.kt") + public void testTryCatchExpression() throws Exception { + runTest("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); + } + @TestMetadata("when.kt") public void testWhen() throws Exception { runTest("compiler/testData/codegen/box/lazyCodegen/when.kt"); @@ -10824,6 +11418,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testInNestedCall() throws Exception { runTest("compiler/testData/codegen/box/nothingValue/inNestedCall.kt"); } + + @TestMetadata("nothingValueException.kt") + public void testNothingValueException() throws Exception { + runTest("compiler/testData/codegen/box/nothingValue/nothingValueException.kt"); + } } @TestMetadata("compiler/testData/codegen/box/nullCheckOptimization") @@ -10875,6 +11474,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testAllFilesPresentInObjectIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objectIntrinsics"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + + @TestMetadata("objects.kt") + public void testObjects() throws Exception { + runTest("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); + } } @TestMetadata("compiler/testData/codegen/box/objects") @@ -11921,6 +12525,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); } + @TestMetadata("nullAsNullableIntIsNull.kt") + public void testNullAsNullableIntIsNull() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); + } + @TestMetadata("nullableAsIndex.kt") public void testNullableAsIndex() throws Exception { runTest("compiler/testData/codegen/box/primitiveTypes/nullableAsIndex.kt"); @@ -12552,10 +13161,40 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); } + @TestMetadata("accessorException.kt") + public void testAccessorException() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); + } + + @TestMetadata("accessorExceptionPublic.kt") + public void testAccessorExceptionPublic() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt"); + } + public void testAllFilesPresentInLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("exceptionField.kt") + public void testExceptionField() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); + } + + @TestMetadata("exceptionGetter.kt") + public void testExceptionGetter() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); + } + + @TestMetadata("kt30548.kt") + public void testKt30548() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt"); + } + + @TestMetadata("localClass.kt") + public void testLocalClass() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/localClass.kt"); + } + @TestMetadata("nameClash.kt") public void testNameClash() throws Exception { runTest("compiler/testData/codegen/box/properties/lateinit/nameClash.kt"); @@ -12566,6 +13205,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/properties/lateinit/override.kt"); } + @TestMetadata("overrideException.kt") + public void testOverrideException() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); + } + @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { runTest("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); @@ -12661,10 +13305,35 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); } + @TestMetadata("kt23260.kt") + public void testKt23260() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/local/kt23260.kt"); + } + @TestMetadata("localLateinit.kt") public void testLocalLateinit() throws Exception { runTest("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); } + + @TestMetadata("uninitializedCapturedMemberAccess.kt") + public void testUninitializedCapturedMemberAccess() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); + } + + @TestMetadata("uninitializedCapturedRead.kt") + public void testUninitializedCapturedRead() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); + } + + @TestMetadata("uninitializedMemberAccess.kt") + public void testUninitializedMemberAccess() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); + } + + @TestMetadata("uninitializedRead.kt") + public void testUninitializedRead() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); + } } @TestMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel") @@ -12675,6 +13344,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); } + @TestMetadata("accessorException.kt") + public void testAccessorException() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); + } + @TestMetadata("accessorForTopLevelLateinit.kt") public void testAccessorForTopLevelLateinit() throws Exception { runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); @@ -12688,6 +13362,16 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testTopLevelLateinit() throws Exception { runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); } + + @TestMetadata("uninitializedMemberAccess.kt") + public void testUninitializedMemberAccess() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); + } + + @TestMetadata("uninitializedRead.kt") + public void testUninitializedRead() throws Exception { + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); + } } } } @@ -12782,6 +13466,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); } + @TestMetadata("kt37370.kt") + public void testKt37370() throws Exception { + runTest("compiler/testData/codegen/box/ranges/kt37370.kt"); + } + @TestMetadata("kt37370a.kt") public void testKt37370a() throws Exception { runTest("compiler/testData/codegen/box/ranges/kt37370a.kt"); @@ -13891,6 +14580,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/ranges/unsigned/kt35004.kt"); } + @TestMetadata("kt36953.kt") + public void testKt36953() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/kt36953.kt"); + } + @TestMetadata("kt36953_continue.kt") public void testKt36953_continue() throws Exception { runTest("compiler/testData/codegen/box/ranges/unsigned/kt36953_continue.kt"); @@ -14072,6 +14766,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/regressions/kt1845.kt"); } + @TestMetadata("kt18779.kt") + public void testKt18779() throws Exception { + runTest("compiler/testData/codegen/box/regressions/kt18779.kt"); + } + @TestMetadata("kt2060.kt") public void testKt2060() throws Exception { runTest("compiler/testData/codegen/box/regressions/kt2060.kt"); @@ -14097,6 +14796,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/regressions/kt2509.kt"); } + @TestMetadata("kt3107.kt") + public void testKt3107() throws Exception { + runTest("compiler/testData/codegen/box/regressions/kt3107.kt"); + } + @TestMetadata("kt32949.kt") public void testKt32949() throws Exception { runTest("compiler/testData/codegen/box/regressions/kt32949.kt"); @@ -14230,6 +14934,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("checkcast.kt") + public void testCheckcast() throws Exception { + runTest("compiler/testData/codegen/box/reified/checkcast.kt"); + } + @TestMetadata("instanceof.kt") public void testInstanceof() throws Exception { runTest("compiler/testData/codegen/box/reified/instanceof.kt"); @@ -14920,11 +15629,31 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); } + @TestMetadata("throwable.kt") + public void testThrowable() throws Exception { + runTest("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); + } + @TestMetadata("throwableCause.kt") public void testThrowableCause() throws Exception { runTest("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); } + @TestMetadata("throwableComplex.kt") + public void testThrowableComplex() throws Exception { + runTest("compiler/testData/codegen/box/specialBuiltins/throwableComplex.kt"); + } + + @TestMetadata("throwableImpl.kt") + public void testThrowableImpl() throws Exception { + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); + } + + @TestMetadata("throwableImplWithSecondaryConstructor.kt") + public void testThrowableImplWithSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); + } + @TestMetadata("valuesInsideEnum.kt") public void testValuesInsideEnum() throws Exception { runTest("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); @@ -16385,6 +17114,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/when/emptyWhen.kt"); } + @TestMetadata("exceptionOnNoMatch.kt") + public void testExceptionOnNoMatch() throws Exception { + runTest("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); + } + @TestMetadata("exhaustiveBoolean.kt") public void testExhaustiveBoolean() throws Exception { runTest("compiler/testData/codegen/box/when/exhaustiveBoolean.kt");