Test framework for inline
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import test.*
|
||||
|
||||
fun test1(s: Long): String {
|
||||
return doSmth(s)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val result = test1(11.toLong())
|
||||
if (result != "11") return "fail1: ${result}"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
inline fun <T> doSmth(a: T) : String {
|
||||
return a.toString()
|
||||
}
|
||||
Reference in New Issue
Block a user