Files
kotlin-fork/backend.native/tests/codegen/function/sum.kt
T
Konstantin Anisimov a910627357 tests: added eqeq test
tests: sum-test: emproved test sum of int with various types of second argument (byte, short and etc)
tests: hello2 minor fix in test
2016-11-10 15:25:08 +03:00

8 lines
245 B
Kotlin

fun sumIB(a:Int, b:Byte ) = a + b
fun sumIS(a:Int, b:Short ) = a + b
fun sumII(a:Int, b:Int ) = a + b
fun sumIL(a:Int, b:Long ) = a + b
fun sumIF(a:Int, b:Float ) = a + b
fun sumID(a:Int, b:Double) = a + b
fun modID(a:Int, b:Double) = a % b