JVM box tests for KT-16752

This commit is contained in:
Dmitry Petrov
2020-12-23 13:45:23 +03:00
committed by TeamCityServer
parent 8bfcef415e
commit 9f908cdf7c
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,13 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM
class Incrementer : (Int) -> Int by Int::inc
fun box(): String {
val incr = Incrementer()
val test = incr(5)
if (test != 6) throw Exception("incr(5): $test")
return "OK"
}
@@ -1260,6 +1260,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("kt16752.kt")
public void testKt16752() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/kt16752.kt");
}
@TestMetadata("kt37604.kt")
public void testKt37604() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/kt37604.kt");