Skip to content

Commit b68837e

Browse files
committed
Fix plugin issue caused by the compiler casting a macro result
1 parent 95f53de commit b68837e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugin/src/main/scala/plugin/CustomControlPhase.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,10 @@ class CustomControlPhase(setting: Setting) extends CommonPhase:
621621
rhs match
622622
case Apply(_, List(Apply(_, List(Typed(SeqLiteral(elems, _), _))))) =>
623623
Some(elems)
624-
case _ => None
624+
case TypeApply(sym @ Select(sel, _), _) if sym.symbol == defn.Any_isInstanceOf =>
625+
unapply(sel)
626+
case _ =>
627+
None
625628
end SI
626629
object Struct:
627630
def unapply(arg: UnApply)(using Context): Option[(Type, List[Tree])] =

0 commit comments

Comments
 (0)