Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala generator uses invalid pattern match deconstruction names for fields that are reserved words #160

Open
ireactsam opened this issue Jun 30, 2020 · 0 comments

Comments

@ireactsam
Copy link
Contributor

When a field is a reserved word, e.g. type, the generator will use in the pattern match the backticked type, but that has an other meaning in Scala pattern matching deconstruction. So in stead of generating

    def pack: ((String, String, ...)) => EventLd = {
      case ((`type`, name, ...)) =>
        EventLd.apply(`type`, name, ...)
    }

it should better generate

    def pack: ((String, String, ...)) => EventLd = {
      case ((type_, name, ...)) =>
        EventLd.apply(type_, name, ...)
    }
rigolepe added a commit that referenced this issue Jun 30, 2020
…ion_names_fix

#160 use a safe pattern match deconstruction name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant