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

Wrong case picked for simple enums transformation #625

Open
8 of 10 tasks
sake92 opened this issue Oct 8, 2024 · 5 comments
Open
8 of 10 tasks

Wrong case picked for simple enums transformation #625

sake92 opened this issue Oct 8, 2024 · 5 comments
Labels
bug Erroneous behavior in existing features duplicate

Comments

@sake92
Copy link

sake92 commented Oct 8, 2024

Checklist

Describe the bug

Wrong case picked for simple enums transformation.

Reproduction

https://scastie.scala-lang.org/NOZPnNesSCCSUkUhseB4kQ

//> using scala 3.5.0
//> using dep io.scalaland::chimney::1.4.0

import io.scalaland.chimney.dsl.*

// picks 'solo' instead of 'school' case...
println(
  Enum1.school.transformInto[Enum2]
)


enum Enum1:
  case solo, team, school

enum Enum2:
  case solo, team, school

If posting a snippet, test it first with scala-cli run --server=false .!

Expected behavior

Pick the "school" case.

Actual behavior

Picks the "solo" case.

Which Chimney version do you use

1.4.0

Which platform do you use

  • JVM
  • Scala.js
  • Scala Native

If you checked JVM

Which JVM distribution do you use (you can provide java -version output).

Additional context

Add any other context about the problem here.

@sake92 sake92 added the bug Erroneous behavior in existing features label Oct 8, 2024
@MateuszKubuszok
Copy link
Member

MateuszKubuszok commented Oct 8, 2024

Duplicate of #479 - the fix made by @jchyb was merged to master, but not yet released. Meanwhile you can check with snapshots.

@sake92
Copy link
Author

sake92 commented Oct 8, 2024

Oh, I couldnt find that issue..
Thanks for great work btw!

@MateuszKubuszok
Copy link
Member

Released in 1.5.0

@sake92
Copy link
Author

sake92 commented Oct 9, 2024

@MateuszKubuszok
Copy link
Member

In such case I have no idea how to fix it. CC @jchyb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Erroneous behavior in existing features duplicate
Projects
None yet
Development

No branches or pull requests

2 participants