Skip to content

Use simple typeable for simple case classes#232

Merged
joroKr21 merged 2 commits intotypelevel:mainfrom
dwickern:scala-enumeration
Jun 12, 2024
Merged

Use simple typeable for simple case classes#232
joroKr21 merged 2 commits intotypelevel:mainfrom
dwickern:scala-enumeration

Conversation

@dwickern
Copy link
Contributor

I ran into this migrating some code from Scala 2 to 3.

Missing Typeable for field of case class shapeless3.typeable.TypeableTests.CaseClassWithEnumeration [614:48]

@joroKr21
Copy link
Member

It's probably missing typeable for enumeration

@dwickern
Copy link
Contributor Author

Actually the problem is we don't need a namedCaseClassTypeable for these simple case classes, we can use a namedSimpleTypeable like Shapeless 2 does. This also avoids an unnecessarily large generated Typeable implementation.

@dwickern dwickern force-pushed the scala-enumeration branch from 43e63fa to 35f6eac Compare June 11, 2024 21:11
@dwickern dwickern changed the title Failing test for scala.Enumeration Use simple typeable for simple case classes Jun 11, 2024
Copy link
Member

@joroKr21 joroKr21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense 👍

@joroKr21 joroKr21 merged commit 6655cc5 into typelevel:main Jun 12, 2024
@dwickern dwickern deleted the scala-enumeration branch June 12, 2024 14:03
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

Successfully merging this pull request may close these issues.

2 participants