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"
}