Calculate default mask shift properly

#KT-18689 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-06-28 14:22:34 +02:00
parent 1fa7193901
commit 4f914fafca
12 changed files with 260 additions and 1 deletions
@@ -0,0 +1,23 @@
// FILE: 1.kt
package test
class Foo {
fun foo() = "OK"
fun foo2() = "OK2"
}
inline fun inlineFn(a: String, crossinline fn: () -> String, x: Long = 1, crossinline fn2: () -> String, c: String): String {
return a + fn() + x + fn2() + c
}
// FILE: 2.kt
import test.*
private val foo = Foo()
fun box(): String {
val result = inlineFn("a", foo::foo, 5, foo::foo2, "end")
return if (result == "aOK5OK2end") "OK" else "fail: $result"
}