Fix all small and medium-sized issues after review
This commit is contained in:
+2
-2
@@ -52,11 +52,11 @@ open class KotlinScriptDefinitionFromAnnotatedTemplate(
|
||||
defAnn != null ->
|
||||
try {
|
||||
defAnn.resolver.primaryConstructor?.call() ?: null.apply {
|
||||
log.error("[kts] No default constructor found for ${defAnn.resolver.qualifiedName}")
|
||||
log.warn("[kts] No default constructor found for ${defAnn.resolver.qualifiedName}")
|
||||
}
|
||||
}
|
||||
catch (ex: ClassCastException) {
|
||||
log.error("[kts] Script def error ${ex.message}")
|
||||
log.warn("[kts] Script def error ${ex.message}")
|
||||
null
|
||||
}
|
||||
else -> BasicScriptDependenciesResolver()
|
||||
|
||||
@@ -37,7 +37,7 @@ fun KotlinScriptDefinition.getScriptParameters(scriptDescriptor: ScriptDescripto
|
||||
|
||||
fun getKotlinType(scriptDescriptor: ScriptDescriptor, kClass: KClass<out Any>): KotlinType =
|
||||
getKotlinTypeByFqName(scriptDescriptor,
|
||||
kClass.qualifiedName ?: throw java.lang.RuntimeException("Cannot get FQN from $kClass"))
|
||||
kClass.qualifiedName ?: throw RuntimeException("Cannot get FQN from $kClass"))
|
||||
|
||||
fun getKotlinTypeByFqName(scriptDescriptor: ScriptDescriptor, fqName: String): KotlinType =
|
||||
scriptDescriptor.module.findNonGenericClassAcrossDependencies(
|
||||
|
||||
Reference in New Issue
Block a user