You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
When a field name ends with _ (and likely any other symbol), the ScalaWriter class generates parameters that look like fieldName_: String. Since there is no space between the _ and the :, the scala compiler assumes the : is part of the variable name and throws a syntax error.
The fix is to just put a space before the : I imagine. Here is a guess at the relevant lines in ScalaWriter:
I was exploring the use of generated case classes when I came across this bug, that won't work for me for unrelated reasons, but I won't be able to test any fixes here. I just thought I'd point out the bug.
Kevin
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When a field name ends with
_
(and likely any other symbol), the ScalaWriter class generates parameters that look likefieldName_: String
. Since there is no space between the_
and the:
, the scala compiler assumes the:
is part of the variable name and throws a syntax error.The fix is to just put a space before the
:
I imagine. Here is a guess at the relevant lines in ScalaWriter:ScalaWriter.scala line 353:
I was exploring the use of generated case classes when I came across this bug, that won't work for me for unrelated reasons, but I won't be able to test any fixes here. I just thought I'd point out the bug.
Kevin
The text was updated successfully, but these errors were encountered: