Skip to content

Commit 1a48c7a

Browse files
authored
Code clean up
1 parent ae594f8 commit 1a48c7a

File tree

1 file changed

+1
-1
lines changed
  • jsoniter-scala-macros/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/macros

1 file changed

+1
-1
lines changed

jsoniter-scala-macros/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/macros/JsonCodecMaker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2823,7 +2823,7 @@ object JsonCodecMaker {
28232823
case '[t1] =>
28242824
val x = m.asExprOf[Option[t1]]
28252825
'{
2826-
if ($x ne None) ${genWriteVal('{ $x.asInstanceOf[Some[t1]].value }, tpe1 :: types, isStringified, None, out)}
2826+
if ($x ne None) ${genWriteVal('{ $x.get }, tpe1 :: types, isStringified, None, out)}
28272827
else $out.writeNull()
28282828
}
28292829
} else if (tpe <:< TypeRepr.of[Array[_]] || tpe <:< TypeRepr.of[immutable.ArraySeq[_]] ||

0 commit comments

Comments
 (0)