[minor] scripting fixes in obsolete and test code...
relax acceptedAnnotations extraction rules for obsolete script template handling code - the previous variant was failing on the typealias comparison also reduce warnings and possible exceptions on some test execution paths
This commit is contained in:
+1
-1
@@ -91,7 +91,7 @@ open class KotlinScriptDefinitionFromAnnotatedTemplate(
|
||||
left.parameters.size == right.parameters.size &&
|
||||
left.parameters.zip(right.parameters).all {
|
||||
it.first.kind == KParameter.Kind.INSTANCE ||
|
||||
it.first.type == it.second.type
|
||||
it.first.name == it.second.name
|
||||
}
|
||||
|
||||
val resolveFunctions = getResolveFunctions()
|
||||
|
||||
+2
-2
@@ -363,7 +363,7 @@ class ScriptTemplateTest : TestCase() {
|
||||
val rootDisposable = Disposer.newDisposable()
|
||||
try {
|
||||
val additionalClasspath = System.getProperty("kotlin.test.script.classpath")?.split(File.pathSeparator)
|
||||
?.map { File(it) }.orEmpty().toTypedArray()
|
||||
?.mapNotNull { File(it).takeIf { file -> file.exists() } }.orEmpty().toTypedArray()
|
||||
val configuration = KotlinTestUtils.newConfiguration(
|
||||
if (includeKotlinRuntime) ConfigurationKind.ALL else ConfigurationKind.JDK_ONLY,
|
||||
TestJdkKind.FULL_JDK,
|
||||
@@ -513,7 +513,7 @@ interface AcceptedAnnotationsCheck {
|
||||
val actualAnnotations = scriptContents.annotations
|
||||
Assert.assertTrue(
|
||||
"Loaded annotation: $actualAnnotations",
|
||||
actualAnnotations.single().annotationClass.qualifiedName == TestAnno1::class.qualifiedName
|
||||
actualAnnotations.singleOrNull()?.annotationClass?.qualifiedName == TestAnno1::class.qualifiedName
|
||||
)
|
||||
|
||||
return ScriptDependencies(
|
||||
|
||||
Reference in New Issue
Block a user