Skip to content

Toolboxes spuriously fail some typechecks after a compile #8637

Closed
@scabug

Description

@scabug
import scala.reflect.runtime.universe._
import scala.reflect.runtime.currentMirror
import scala.tools.reflect.ToolBox

object Test extends App {
  val tb = currentMirror.mkToolBox()
  tb.compile(q"true > true")
  tb.typecheck(q"true > true")
}

Typers.isAdaptableWithView returns false when typechecking the second q"true > true", because globalPhase.id is 25. Looks like tb.typecheck doesn't reset the current phase.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions