Skip to content

Avoid multiple anonymous classes created during macro expansion #417

@luksow

Description

@luksow

See: https://github.com/scalalandio/chimney/pull/637/files
or: scala/scala3#16723

I think there're couple of places we should take care of it like: EnumLike, ValueEnumLike, AllGenerators and RootJsonFormat. There're compilation warnings associated, e.g.

[warn] -- [E197] Potential Issue Warning: /home/luksow/iterators/kebs/enumeratum/src/main/scala-3/pl/iterators/kebs/enumeratum/KebsEnumeratum.scala:13:4 
[warn] 13 |    new EnumLike[E] {
[warn]    |    ^
[warn]    |   New anonymous class definition will be duplicated at each inline site
[warn]    |
[warn]    | longer explanation available when compiling with `-explain`

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