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

- fixed problem with optional newtypes #120

Merged

Conversation

alexshabal
Copy link
Contributor

Currently this code block:

@newtype
final case class PointTitle(value: String)
final case class Point(pointTitle: Option[PointTitle])
object Point {
   implicit val binder: Binder[Point] = ???
}

cqlt"INSERT INTO table (point) VALUES (${Put[Point]})"

would produce compilation error diverging implicit expansion for type com.ringcentral.cassandra4io.cql.package.Binder[Option[PointTitle]] starting with method widenBinder in object Binder

I'm actually wondering why this happens only with newtypes inside of options (I havent figured it out yet), but splitting hConsBindableValuesBuilder(generic over V[_] <: Values[_]) into three concrete ones solves this problem

@alexshabal alexshabal changed the title - fixed problem wit optional newtypes - fixed problem with optional newtypes Dec 4, 2024
@ilyshav ilyshav self-assigned this Dec 5, 2024
@ilyshav ilyshav self-requested a review December 5, 2024 12:07
@ilyshav ilyshav merged commit 2f17197 into ringcentral:main Dec 5, 2024
2 checks passed
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