backend: enable and add tests for autoboxing

This commit is contained in:
Svyatoslav Scherbina
2016-12-19 14:58:54 +07:00
committed by SvyatoslavScherbina
parent 61c28db886
commit f2b5b98dba
12 changed files with 179 additions and 2 deletions
@@ -0,0 +1,17 @@
fun printInt(x: Int) = println(x)
fun printBoolean(x: Boolean) = println(x)
fun foo(arg: Any) {
if (arg is Int)
printInt(arg)
else if (arg is Boolean)
printBoolean(arg)
else
println("other")
}
fun main(args: Array<String>) {
foo(1)
foo(true)
foo("Hello")
}