Minor. Fix review remarks
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: 1.kt
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
||||
package test
|
||||
|
||||
class A(val value: String) {
|
||||
fun ok() = value
|
||||
}
|
||||
|
||||
inline fun inlineFun(a: String, lambda: (String) -> A = ::A): A {
|
||||
return lambda(a)
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return inlineFun("OK").value
|
||||
}
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
fun ok() = "OK"
|
||||
|
||||
object A {
|
||||
fun ok() = "OK"
|
||||
}
|
||||
|
||||
inline fun stub() {}
|
||||
|
||||
|
||||
// FILE: 2.kt
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
||||
import test.A.ok
|
||||
|
||||
inline fun inlineFun(lambda: () -> String = ::ok): String {
|
||||
return lambda()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return inlineFun()
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
object A {
|
||||
val ok = "OK"
|
||||
}
|
||||
inline fun stub() {}
|
||||
|
||||
|
||||
// FILE: 2.kt
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
||||
import test.A.ok
|
||||
|
||||
inline fun inlineFun(lambda: () -> String = ::ok): String {
|
||||
return lambda()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return inlineFun()
|
||||
}
|
||||
Reference in New Issue
Block a user