mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
22 lines
382 B
Kotlin
Vendored
22 lines
382 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS
|
|
|
|
// WITH_REFLECT
|
|
|
|
class A {
|
|
fun foo(x: Int, y: Int) = x + y
|
|
}
|
|
|
|
fun box(): String {
|
|
val x = (A::foo).call(A(), 42, 239)
|
|
if (x != 281) return "Fail: $x"
|
|
|
|
try {
|
|
(A::foo).call()
|
|
return "Fail: no exception"
|
|
}
|
|
catch (e: Exception) {}
|
|
|
|
return "OK"
|
|
}
|