Skip to content

Commit 3b04433

Browse files
authored
Code clean up
1 parent bba9ede commit 3b04433

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,8 +1960,8 @@ object JsonCodecMaker {
19601960
val nm = Expr(~(1 << fieldInfo.nonTransientFieldIndex))
19611961
if (cfg.checkFieldDuplication) {
19621962
'{
1963-
if (($n & $m) != 0) ${Assign(n.asTerm, '{ $n ^ $m }.asTerm).asExprOf[Unit]}
1964-
else $in.duplicatedKeyError($l)
1963+
if (($n & $m) == 0) $in.duplicatedKeyError($l)
1964+
${Assign(n.asTerm, '{ $n ^ $m }.asTerm).asExprOf[Unit]}
19651965
}.asTerm
19661966
} else Assign(n.asTerm, '{ $n & $nm }.asTerm)
19671967
} else '{ }.asTerm

0 commit comments

Comments
 (0)