Provide toString method for ScriptCompilationConfigurationWrapper
This is needed for debug and logging proposes
This commit is contained in:
+4
@@ -48,6 +48,10 @@ abstract class ScriptDefinition : UserDataHolderBase() {
|
||||
inline fun <reified T : KotlinScriptDefinition> asLegacyOrNull(): T? =
|
||||
if (this is FromLegacy) legacyDefinition as? T else null
|
||||
|
||||
override fun toString(): String {
|
||||
return "ScriptDefinition($name)"
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
open class FromLegacy(
|
||||
override val hostConfiguration: ScriptingHostConfiguration,
|
||||
|
||||
+8
@@ -152,6 +152,10 @@ abstract class ScriptCompilationConfigurationWrapper(val script: SourceCode) {
|
||||
super.equals(other) && other is FromCompilationConfiguration && configuration == other.configuration
|
||||
|
||||
override fun hashCode(): Int = super.hashCode() + 23 * (configuration?.hashCode() ?: 1)
|
||||
|
||||
override fun toString(): String {
|
||||
return "FromCompilationConfiguration($configuration)"
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@@ -200,6 +204,10 @@ abstract class ScriptCompilationConfigurationWrapper(val script: SourceCode) {
|
||||
super.equals(other) && other is FromLegacy && legacyDependencies == other.legacyDependencies
|
||||
|
||||
override fun hashCode(): Int = super.hashCode() + 31 * (legacyDependencies?.hashCode() ?: 1)
|
||||
|
||||
override fun toString(): String {
|
||||
return "FromLegacy($legacyDependencies)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user