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

Comparing JSON objects causes StackOverflowError #373

Open
anton-zen opened this issue Mar 25, 2022 · 0 comments
Open

Comparing JSON objects causes StackOverflowError #373

anton-zen opened this issue Mar 25, 2022 · 0 comments

Comments

@anton-zen
Copy link

import io.circe._, io.circe.parser._

    val rawJson: String = """
{
  "foo": "bar",
  "baz": 123,
  "list of stuff": [ 4, 5, 6 ]
}
"""

    parse(rawJson) shouldMatchTo (parse(rawJson))

Compilation error at shouldMatchTo:

method subtypes is declared as erased, but is in fact used

Scalatest output:

...
[error] dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1451)
[error] dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
[error] dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:771)
[error] dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:107)
[error] dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:845)
[error] dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:771)
[error] dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:107)
[error] dotty.tools.dotc.typer.Inliner.searchImplicit$1(Inliner.scala:845)
[error] dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:852)
[error]            
[error] stack trace is suppressed; run last Test / compileIncremental for the full output
[error] (Test / compileIncremental) java.lang.StackOverflowError

Scala 3

@anton-zen anton-zen changed the title Comparing 2 JSON objects leads to StackOverflowError Comparing JSON objects causes StackOverflowError Mar 25, 2022
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

1 participant