db2fb86c8e
Testing: total kotlin test controls no stubs in FIR in non-stub-mode #KT-29002 Fixed
24 lines
412 B
Kotlin
Vendored
24 lines
412 B
Kotlin
Vendored
infix fun distance(x: Int, y: Int) = x + y
|
|
|
|
fun test(): Int = 3 distance 4
|
|
|
|
fun testRegular(): Int = distance(3, 4)
|
|
|
|
class My(var x: Int) {
|
|
operator fun invoke() = x
|
|
|
|
fun foo() {}
|
|
|
|
fun copy() = My(x)
|
|
}
|
|
|
|
fun testInvoke(): Int = My(13)()
|
|
|
|
fun testQualified(first: My, second: My?) {
|
|
println(first.x)
|
|
println(second?.x)
|
|
first.foo()
|
|
second?.foo()
|
|
first.copy().foo()
|
|
first.x = 42
|
|
} |