diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java index e50ac3acd87..c58dcf09757 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java @@ -109,7 +109,7 @@ public abstract class CommonCompilerArguments implements Serializable { public List freeArgs = new SmartList<>(); - public ArgumentParseErrors errors = new ArgumentParseErrors(); + public transient ArgumentParseErrors errors = new ArgumentParseErrors(); @NotNull public static CommonCompilerArguments createDefaultInstance() { diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt index 94f5477b762..f903bbc41a9 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt @@ -79,7 +79,7 @@ fun collectFieldsToCopy(clazz: Class<*>, inheritedOnly: Boolean): List { while (currentClass != null) { for (field in currentClass.declaredFields) { val modifiers = field.modifiers - if (!Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers)) { + if (!Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers) && !Modifier.isTransient(modifiers)) { fromFields.add(field) } }