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

Comparing JSON objects causes StackOverflowError #373

@anton-zen

Description

@anton-zen
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions