Properly process primitive receiver on inlining bound callable references

#KT-18728 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-06-30 13:11:53 +02:00
parent fe17c4416e
commit 49252f6eec
17 changed files with 404 additions and 5 deletions
@@ -0,0 +1,18 @@
// FILE: 1.kt
package test
inline fun <R> map(transform: () -> R): R {
return transform()
}
// FILE: 2.kt
import test.*
val Long.myInc
get() = this + 1
fun box(): String {
val result = map(2L::myInc)
return if (result == 3L) "OK" else "fail $result"
}