Compile most test scripts with runtime

This commit is contained in:
Ilya Chernikov
2016-09-07 13:22:34 +02:00
parent 385aab8418
commit 42a4f0ed70
13 changed files with 36 additions and 41 deletions
+2 -2
View File
@@ -2,12 +2,12 @@
fun fib(n: Int): Int {
val v = if(n < 2) 1 else fib(n-1) + fib(n-2)
System.out.println("fib($n)=$v")
println("fib($n)=$v")
return v
}
val num = if (args.size > 0) java.lang.Integer.parseInt(args[0]) else 4
val comment = if (args.size > 1) args[1] else "none"
System.out.println("num: $num ($comment)")
println("num: $num ($comment)")
val result = fib(num)