Skip to content

Commit

Permalink
Fix ClassCastException in reflective original tree lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
retronym authored and eed3si9n committed Sep 19, 2021
1 parent 922885f commit 97ae167
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object Compat {
} catch { case _: Throwable => null }

private object Reflective extends OriginalTreeTraverser {
private[this] val ct = scala.reflect.ClassTag(cls)
private[this] val ct = scala.reflect.ClassTag[AnyRef](cls)
private[this] val meth = cls.getMethod("original")
def traverseOriginal[T <: Global#Tree](t: T)(f: T => Unit): Unit =
t.attachments.get(ct) match {
Expand Down

0 comments on commit 97ae167

Please sign in to comment.