scala-debug-adapter icon indicating copy to clipboard operation
scala-debug-adapter copied to clipboard

Failed evaluation of encoded outer

Open adpi2 opened this issue 2 years ago • 0 comments

With EvaluationMode.ScalaEvaluationOnly, this test fails:

test("encoded outer") {
    val source =
      """|package example
         |
         |class `A+B` {
         |  val foo = 42
         |  object && {
         |    def x = {
         |      println(foo)
         |      42
         |    }
         |  }
         |}
         |
         |object Main {
         |  def main(args: Array[String]): Unit = {
         |    val ab = new `A+B`
         |    println(ab.&&.x)
         |  }
         |}
         |""".stripMargin
    implicit val debuggee: TestingDebuggee = TestingDebuggee.mainClass(source, "example.Main", scalaVersion)
    check(Breakpoint(8), Evaluation.success("foo", 42))

The error message is:

Expected success, got LeftProjection(Left(Cannot evaluate because of failed compilation:
[error] Bad symbolic reference. A signature
[error] refers to Expressionedd69075124f47788efe591c487a9522/T in package example which is not available.
...

adpi2 avatar Aug 02 '23 13:08 adpi2