Support private package properties in inline functions
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
val packageResult = packageInline { a, b -> a + b }
|
||||
if (packageResult != "OK") return "package inline fail: $packageResult"
|
||||
|
||||
val samePackageResult = samePackageCall()
|
||||
if (samePackageResult != "OK") return "same package inline fail: $samePackageResult"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package test
|
||||
|
||||
private val packageProp = "O"
|
||||
|
||||
private fun packageFun() = "K"
|
||||
|
||||
inline fun packageInline(p: (String, String) -> String): String {
|
||||
return p(packageProp, packageFun())
|
||||
}
|
||||
|
||||
fun samePackageCall(): String {
|
||||
return packageInline { s, s2 -> s + s2 }
|
||||
}
|
||||
Reference in New Issue
Block a user