Skip to content

Commit

Permalink
Doh, forgot to replace a type in template for string enums
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg committed Aug 7, 2023
1 parent d4b0857 commit a83e082
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typo/src/scala/typo/internal/codegen/StringEnumFile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object StringEnumFile {
val obj = genObject.withBody(qident, instances)(
code"""|def apply($str: ${sc.Type.String}): ${sc.Type.Either.of(sc.Type.String, EnumType)} =
| ByName.get($str).toRight(s"'$$str' does not match any of the following legal values: $$Names")
|def force($str: String): Sector =
|def force($str: String): $EnumType =
| apply($str) match {
| case ${sc.Type.Left}(msg) => sys.error(msg)
| case ${sc.Type.Right}(value) => value
Expand Down

0 comments on commit a83e082

Please sign in to comment.