Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant