chimney icon indicating copy to clipboard operation
chimney copied to clipboard

A way to convert between ScalaPB enum

Open Lagawrd opened this issue 2 years ago • 0 comments

enum Some { OPTIONA = 0; OPTIONB = 1; OPTIONC = 2; }

enum SomeOther { OPTIONA = 0; OPTIONB = 1; OPTIONC = 2; }

I am currently not able to do something like Some.transformInto[SomeOther]. It errors out with being ambiguous.

I tried writing my own implicit class to deal with identical/similar enum attributes but I am not able to since GeneratedEnumCompanion and GeneratedEnum are traits.

Lagawrd avatar Jun 24 '22 19:06 Lagawrd