diff --git a/compiler/testData/script/fib_ext_ann.kts b/compiler/testData/script/fib_ext_ann.kts index d7001ac1aed..3f2de7312d4 100644 --- a/compiler/testData/script/fib_ext_ann.kts +++ b/compiler/testData/script/fib_ext_ann.kts @@ -1,7 +1,7 @@ // this script expected parameter num : Int -@file:org.jetbrains.kotlin.scripts.depends("@{runtime}") +@file:DependsOn("@{runtime}") fun fib(n: Int): Int { val v = if(n < 2) 1 else fib(n-1) + fib(n-2) diff --git a/compiler/tests/org/jetbrains/kotlin/scripts/ScriptTest2.kt b/compiler/tests/org/jetbrains/kotlin/scripts/ScriptTest2.kt index 9531bbf7d6d..b4438466626 100644 --- a/compiler/tests/org/jetbrains/kotlin/scripts/ScriptTest2.kt +++ b/compiler/tests/org/jetbrains/kotlin/scripts/ScriptTest2.kt @@ -122,7 +122,7 @@ class TestKotlinScriptDependenciesResolver : AnnotationBasedScriptDependenciesRe private val kotlinPaths by lazy { PathUtil.getKotlinPathsForCompiler() } - @AcceptedAnnotations(depends::class) + @AcceptedAnnotations(DependsOn::class) override fun resolve(scriptFile: File?, annotations: Iterable, environment: Map?, @@ -131,13 +131,14 @@ class TestKotlinScriptDependenciesResolver : AnnotationBasedScriptDependenciesRe { val cp = annotations.flatMap { when (it) { - is depends -> listOf(if (it.path == "@{runtime}") kotlinPaths.runtimePath else File(it.path)) + is DependsOn -> listOf(if (it.path == "@{runtime}") kotlinPaths.runtimePath else File(it.path)) is InvalidScriptResolverAnnotation -> throw Exception("Invalid annotation ${it.name}", it.error) else -> throw Exception("Unknown annotation ${it.javaClass}") } } return object : KotlinScriptExternalDependencies { override val classpath: Iterable = classpathFromClassloader() + cp + override val imports: Iterable = listOf("org.jetbrains.kotlin.scripts.DependsOn") } } @@ -165,4 +166,4 @@ abstract class ScriptWithBaseClass(num: Int, passthrough: Int) : TestDSLClassWit @Target(AnnotationTarget.FILE) @Retention(AnnotationRetention.RUNTIME) -annotation class depends(val path: String) +annotation class DependsOn(val path: String)