Files
kotlin-fork/compiler/testData/script/fib_ext.kts
T
2016-06-07 21:12:39 +02:00

17 lines
295 B
Kotlin
Vendored

// this script expected parameter num : Int
fun fib(n: Int): Int {
val v = if(n < 2) 1 else fib(n-1) + fib(n-2)
System.out.println("fib($n)=$v")
return v
}
val hdr = "Num".decapitalize()
org.junit.Assert.assertTrue(false)
System.out.println("$hdr: $num")
val result = fib(num)