You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
traitImp0 {
caseclassUser(
name: String,
age: Int,
path: Path=Path.of("http://google.com")
)
implicitdefpojoCodec[T<:AnyRef]:JsonValueCodec[T] = {
print_@("pojo")
???
} // fallback to jackson hereimplicitlazyvalpojoCodec2:JsonValueCodec[AnyRef] = { // only works iif JsonValueCodec is contravariant
print_@("pojo")
???
} // fallback to jackson here
}
objectJsoniterFallbackExampleextendsImp0 {
// Generate codec for Person (automatically handles Address too)implicitlazyvalpersonCodec:JsonValueCodec[User] =JsonCodecMaker.make
}
The intention is to use Jackson to handle Java Path which is not a Scala product type. When compiling, it generates the following error:
[Error] /home/peng/git/scalaspike/common/generic/src/test/scala/com/tribbloids/spike/generic/jsoniter/JsoniterFallbackExample.scala:34:72: Internal error: unable to find the outer accessor symbol of <$anon: com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec>
one error found
What is "outer accessor symbol" here? Can the internal error stack trace be reported and potentially be used in telemetry?
The text was updated successfully, but these errors were encountered:
What you see is an internal error from the scalac.
Feel free to mitigate in your code by moving your data classes out a trait or contribute some mitigations to jsoniter-scala macros (or even scalac if the root cause is in its side).
Code example:
The intention is to use Jackson to handle Java Path which is not a Scala product type. When compiling, it generates the following error:
What is "outer accessor symbol" here? Can the internal error stack trace be reported and potentially be used in telemetry?
The text was updated successfully, but these errors were encountered: