Files
kotlin-fork/compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.kt
T
Mikhail Glukhikh db2fb86c8e Raw FIR: implement expression trees & conversions from PSI
Testing: total kotlin test controls no stubs in FIR in non-stub-mode
#KT-29002 Fixed
2019-02-06 11:58:59 +03:00

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
}