Skip to content

Commit

Permalink
remove Product & Serializable from types inferred across companions
Browse files Browse the repository at this point in the history
  • Loading branch information
github-brice-jaglin authored May 26, 2021
1 parent d834da0 commit cb4ccf6
Showing 1 changed file with 3 additions and 3 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 Any with Product with Serializable {
type ValueType = A
def fromValue(value: Int): A
def fromName(name: String): Option[A] = values.find(_.name == name)
Expand All @@ -67,7 +67,7 @@ trait GeneratedOneof extends Any with Product with Serializable {
def valueOption: Option[ValueType] = if (isDefined) Some(value) else None
}

trait GeneratedOneofCompanion
trait GeneratedOneofCompanion extends Any with Product with Serializable

trait GeneratedMessage extends Any with Product with Serializable {

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 Any with Product with Serializable {
self =>
type ValueType = A

Expand Down

0 comments on commit cb4ccf6

Please sign in to comment.