Support for multiparam dependency annotations (with reservations)

Due to missing feature (#KT-13106) it works either with single argument
or with all named arguments.
This commit is contained in:
Ilya Chernikov
2016-07-14 15:21:17 +02:00
parent 5900cad8b3
commit 210a37e08c
4 changed files with 99 additions and 58 deletions
+16
View File
@@ -0,0 +1,16 @@
// this script expected parameter num : Int
@file:DependsOnTwo(path2 = "@{runtime}")
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()
System.out.println("$hdr: $num")
val result = fib(num)