Fix equality and serializability of scripting data, fix relevant caching behaviour
This commit is contained in:
@@ -32,4 +32,13 @@ class KotlinType private constructor(
|
||||
* Constructs KotlinType from reflected [ktype]
|
||||
*/
|
||||
constructor(type: KType) : this(type.classifier as KClass<*>)
|
||||
|
||||
override fun equals(other: Any?): Boolean =
|
||||
(other as? KotlinType)?.let { typeName == it.typeName } == true
|
||||
|
||||
override fun hashCode(): Int = typeName.hashCode()
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 1L
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,14 +190,18 @@ class RefineConfigurationBuilder : PropertiesCollection.Builder() {
|
||||
typealias RefineScriptCompilationConfigurationHandler =
|
||||
(ScriptConfigurationRefinementContext) -> ResultWithDiagnostics<ScriptCompilationConfiguration>
|
||||
|
||||
class RefineConfigurationUnconditionallyData(
|
||||
data class RefineConfigurationUnconditionallyData(
|
||||
val handler: RefineScriptCompilationConfigurationHandler
|
||||
) : Serializable
|
||||
) : Serializable {
|
||||
companion object { private const val serialVersionUID: Long = 1L }
|
||||
}
|
||||
|
||||
class RefineConfigurationOnAnnotationsData(
|
||||
data class RefineConfigurationOnAnnotationsData(
|
||||
val annotations: List<KotlinType>,
|
||||
val handler: RefineScriptCompilationConfigurationHandler
|
||||
) : Serializable
|
||||
) : Serializable {
|
||||
companion object { private const val serialVersionUID: Long = 1L }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -66,7 +66,9 @@ interface ExternalSourceCode : SourceCode {
|
||||
/**
|
||||
* The source code [range] with the the optional [name]
|
||||
*/
|
||||
data class ScriptSourceNamedFragment(val name: String?, val range: SourceCode.Range)
|
||||
data class ScriptSourceNamedFragment(val name: String?, val range: SourceCode.Range) : Serializable {
|
||||
companion object { private const val serialVersionUID: Long = 1L }
|
||||
}
|
||||
|
||||
/**
|
||||
* The general interface to the Script dependency (see platform-specific implementations)
|
||||
|
||||
Reference in New Issue
Block a user