New tests added
This commit is contained in:
committed by
KonstantinAnisimov
parent
b9235ca8b1
commit
c7e4f0f28f
@@ -0,0 +1,29 @@
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T> foo2(i2: T, j2: T, p2: (T, T) -> Boolean): Boolean {
|
||||
return p2(i2, j2)
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T> foo1(i1: T, j1: T, p1: (T, T) -> Boolean): Boolean {
|
||||
return foo2<T>(i1, j1, p1)
|
||||
}
|
||||
|
||||
fun bar(): Boolean {
|
||||
val result = foo1 <Int> (3, 3) { x1: Int, x2: Int -> x1 == x2 }
|
||||
return result
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(bar().toString())
|
||||
}
|
||||
|
||||
public inline fun foo(): Any? {
|
||||
var result = null
|
||||
return result
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
foo()
|
||||
foo()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user