File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
bson-scala/src/main/scala/org/mongodb/scala/bson/codecs/macrocodecs Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ private[codecs] object CaseClassCodec {
350
350
val instanceValue = value.asInstanceOf[ ${classType}]
351
351
.. ${writeClassValues(fields, ignoredFields(classType))}"""
352
352
}.toSeq
353
- }
353
+ } :+ cq """ _ => throw new BsonInvalidOperationException("Unexpected class type: " + className) """
354
354
q """
355
355
writer.writeStartDocument()
356
356
this.writeClassFieldName(writer, className, encoderContext)
Original file line number Diff line number Diff line change @@ -128,6 +128,15 @@ configure(scalaProjects) {
128
128
129
129
tasks. withType(ScalaCompile ) {
130
130
scalaCompileOptions. deprecation = false
131
+ if (scalaVersion. startsWith(" 2.13" )) {
132
+ scalaCompileOptions. additionalParameters = [
133
+ " -feature" ,
134
+ " -unchecked" ,
135
+ " -language:reflectiveCalls" ,
136
+ " -Wconf:cat=deprecation:ws,any:e" ,
137
+ " -Xlint:strict-unsealed-patmat"
138
+ ]
139
+ }
131
140
}
132
141
133
142
tasks. withType(GenerateModuleMetadata ) {
You can’t perform that action at this time.
0 commit comments