Files
kotlin-fork/backend.native/tests/codegen/object/method_call.kt
T
2017-10-20 18:25:05 +03:00

13 lines
201 B
Kotlin

package codegen.`object`.method_call
import kotlin.test.*
class A(val a:Int) {
fun foo(i:Int) = a + i
}
fun fortyTwo() = A(41).foo(1)
@Test fun runTest() {
if (fortyTwo() != 42) throw Error()
}