Skip to content

Commit

Permalink
remove Serializable from types inferred across companions (#1162)
Browse files Browse the repository at this point in the history
Serializable is added to companion objects when the class itself
extends Serializable.
  • Loading branch information
github-brice-jaglin authored Jun 2, 2021
1 parent af0a0e1 commit 1944632
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ trait UnrecognizedEnum extends GeneratedEnum {
companion.scalaDescriptor.findValueByNumberCreatingIfUnknown(value)
}

trait GeneratedEnumCompanion[A <: GeneratedEnum] {
trait GeneratedEnumCompanion[A <: GeneratedEnum] extends Serializable {
type ValueType = A
def fromValue(value: Int): A
def fromName(name: String): Option[A] = values.find(_.name == name)
Expand Down Expand Up @@ -160,7 +160,7 @@ trait JavaProtoSupport[ScalaPB, JavaPB] extends Any {
def toJavaProto(scalaProto: ScalaPB): JavaPB
}

trait GeneratedMessageCompanion[A <: GeneratedMessage] {
trait GeneratedMessageCompanion[A <: GeneratedMessage] extends Serializable {
self =>
type ValueType = A

Expand Down

0 comments on commit 1944632

Please sign in to comment.