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 {
350350 val instanceValue = value.asInstanceOf[ ${classType}]
351351 .. ${writeClassValues(fields, ignoredFields(classType))}"""
352352 }.toSeq
353- }
353+ } :+ cq """ _ => throw new BsonInvalidOperationException("Unexpected class type: " + className) """
354354 q """
355355 writer.writeStartDocument()
356356 this.writeClassFieldName(writer, className, encoderContext)
Original file line number Diff line number Diff line change @@ -128,6 +128,15 @@ configure(scalaProjects) {
128128
129129 tasks. withType(ScalaCompile ) {
130130 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+ }
131140 }
132141
133142 tasks. withType(GenerateModuleMetadata ) {
You can’t perform that action at this time.
0 commit comments