Skip to content

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

@ireactsam

Description

@ireactsam

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, ...)
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions