Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pshirshov committed Nov 8, 2023
1 parent 98ac505 commit 76227a7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ class CSUEBACodecGenerator(trans: CSTypeTranslator, tools: CSDefnTools)
val branchName = m.name.name
val fqBranch = q"$branchNs.$branchName"
val cName = codecName(trans.toCsVal(m, version))
val castedName = branchName.toLowerCase

(q"""if (value is $fqBranch cvalue)
(q"""if (value is $fqBranch $castedName)
|{
| writer.Write((byte)${idx.toString});
| $cName.Instance.Encode(writer, cvalue);
| $cName.Instance.Encode(writer, $castedName);
| return;
|}""".stripMargin, q"""if (asByte == ${idx.toString})
|{
Expand Down

0 comments on commit 76227a7

Please sign in to comment.