From cb4ccf654e579849b2f8720940c3c97cb40a4b8d Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Wed, 26 May 2021 16:39:50 +0200 Subject: [PATCH] remove Product & Serializable from types inferred across companions --- .../src/main/scala/scalapb/GeneratedMessageCompanion.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scalapb-runtime/src/main/scala/scalapb/GeneratedMessageCompanion.scala b/scalapb-runtime/src/main/scala/scalapb/GeneratedMessageCompanion.scala index 1ee5e5279..188c15dbe 100644 --- a/scalapb-runtime/src/main/scala/scalapb/GeneratedMessageCompanion.scala +++ b/scalapb-runtime/src/main/scala/scalapb/GeneratedMessageCompanion.scala @@ -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) @@ -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 { @@ -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