File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed
compiler-plugin/src/main/scala/scalapb/compiler
js-native/com/google/protobuf/struct
scalajvm/com/google/protobuf/struct Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 33- Bump protobuf and protoc to 4.26.0. Currently files must specify proto2 and
44 proto3 syntax. Editions are not supported yet.
55- References to descriptors are fully qualified (#1724 )
6+ - Oneofs are now generated as sealed abstract class instead of sealed traits (#1694 )
67
78## [ 0.11.18] (Unreleased)
89- References to descriptors are fully qualified (#1724 )
Original file line number Diff line number Diff line change @@ -115,7 +115,9 @@ class ProtobufGenerator(
115115
116116 def printOneof (printer : FunctionalPrinter , e : OneofDescriptor ): FunctionalPrinter = {
117117 printer
118- .add(s " sealed trait ${e.scalaType.nameSymbol} extends ${e.baseClasses.mkString(" with " )} { " )
118+ .add(
119+ s " sealed abstract class ${e.scalaType.nameSymbol} extends ${e.baseClasses.mkString(" with " )} { "
120+ )
119121 .indent
120122 .add(s " def isEmpty: _root_.scala.Boolean = false " )
121123 .add(s " def isDefined: _root_.scala.Boolean = true " )
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ object Value extends scalapb.GeneratedMessageCompanion[com.google.protobuf.struc
195195 lazy val defaultInstance = com.google.protobuf.struct.Value (
196196 kind = com.google.protobuf.struct.Value .Kind .Empty
197197 )
198- sealed trait Kind extends _root_.scalapb.GeneratedOneof {
198+ sealed abstract class Kind extends _root_.scalapb.GeneratedOneof {
199199 def isEmpty : _root_.scala.Boolean = false
200200 def isDefined : _root_.scala.Boolean = true
201201 def isNullValue : _root_.scala.Boolean = false
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ object Value extends scalapb.GeneratedMessageCompanion[com.google.protobuf.struc
216216 lazy val defaultInstance = com.google.protobuf.struct.Value (
217217 kind = com.google.protobuf.struct.Value .Kind .Empty
218218 )
219- sealed trait Kind extends _root_.scalapb.GeneratedOneof {
219+ sealed abstract class Kind extends _root_.scalapb.GeneratedOneof {
220220 def isEmpty : _root_.scala.Boolean = false
221221 def isDefined : _root_.scala.Boolean = true
222222 def isNullValue : _root_.scala.Boolean = false
You can’t perform that action at this time.
0 commit comments