Skip to content

Commit

Permalink
Fix unexpected Scala 3 compiler warning for generic sum types
Browse files Browse the repository at this point in the history
  • Loading branch information
plokhotnyuk committed Mar 8, 2024
1 parent 8b73063 commit 680b5e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3084,7 +3084,7 @@ object JsonCodecMaker {
genWriteLeafClass(subTpe, Some(writeDiscriminator), Ref(vxSym)).asTerm)
}
}
Match(x.asTerm, writeSubclasses.toList).asExprOf[Unit]
Match('{$x: @scala.unchecked}.asTerm, writeSubclasses.toList).asExprOf[Unit]
} else if (isNonAbstractScalaClass(tpe)) withEncoderFor(methodKey, m, out) { (out, x) =>
genWriteNonAbstractScalaClass(x.asExprOf[T], types, optWriteDiscriminator, out)
} else if (isConstType(tpe)) getWriteConstType(tpe, isStringified, out)
Expand Down

0 comments on commit 680b5e1

Please sign in to comment.