tests added

This commit is contained in:
Denis Zharkov
2014-07-09 20:09:18 +04:00
committed by Alexander Udalov
parent e53e4fe257
commit 0f5e29df9b
22 changed files with 541 additions and 2 deletions
@@ -0,0 +1,22 @@
inline fun <R, T> foo(x : R?, block : (R?) -> T) : T {
return block(x)
}
fun bar() {
foo(1) { x -> x!!.toLong() }
foo(1) { x -> x!!.toShort() }
foo(1L) { x -> x!!.toByte() }
foo(1L) { x -> x!!.toShort() }
foo('a') { x -> x!!.toDouble() }
foo(1.0) { x -> x!!.toByte() }
}
// 0 valueOf
// 0 Value\s\(\)
// 1 I2L
// 2 L2I
// 2 I2S
// 2 I2B
// 1 I2D
// 1 D2I