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

Codec.Record[T] breaks when case class contains a field named 'value' #246

Open
fauna-arnaud opened this issue Sep 8, 2020 · 1 comment

Comments

@fauna-arnaud
Copy link
Contributor

Using fauna-scala 3.0.0

case class Type(value: String, count: Int)

object Type {
  implicit val codec: RecordCodec[Type] = Codec.Record[Type]
}

yields

[error] /home/agourlay/Workspace/allez-fauna/server/src/main/scala/agourlay/allez/api/Models.scala:54:55: type mismatch;
[error]  found   : String("count")
[error]  required: Int
[error]   implicit val codec: RecordCodec[Type] = Codec.Record[Type]
[error]                                                       ^
[error] one error found

whereas the following compiles

case class Type(v: String, count: Int)

object Type {
  implicit val codec: RecordCodec[Type] = Codec.Record[Type]
}
@n400
Copy link

n400 commented Mar 10, 2021

Thank you! This is ticketed internally as DRV-268.

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

No branches or pull requests

2 participants