Skip to content

Commit

Permalink
Merge pull request #1 from namantash/master
Browse files Browse the repository at this point in the history
Fix for enum codegen defect
  • Loading branch information
abashev authored Jan 10, 2020
2 parents 5abb260 + c9f2613 commit 42de0d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Generator(defaultNameSpace: String = "thrift", output: File = new File("ge
("elems" -> (if (enum.elems.isEmpty) Seq()
else {
val lastElem = enum.elems.last
(for (elem <- enum.elems.dropRight(1)) yield Map("name" -> elem._1.name, "id" -> elem._2)) :+
(for (elem <- enum.elems.dropRight(1)) yield Map("name" -> elem._1.name, "id" -> elem._2.toString)) :+
Map("name" -> lastElem._1.name, "id" -> lastElem._2.toString, "last" -> true)
}))
}
Expand Down

0 comments on commit 42de0d0

Please sign in to comment.