Add possibility to specify supertypes for script, with tests

This commit is contained in:
Ilya Chernikov
2016-05-31 16:24:41 +02:00
parent 670627ac4e
commit 3c1503564e
10 changed files with 130 additions and 15 deletions
+14
View File
@@ -0,0 +1,14 @@
import org.jetbrains.kotlin.scripts.*
// this script expected parameter num : Int
fun fib(n: Int): Int {
val v = fibCombine( { fib(it) }, n)
System.out.println("fib($n)=$v")
return v
}
System.out.println("num: $num")
val result = fib(num)