Skip to content

Commit

Permalink
Update reflect param clauses API
Browse files Browse the repository at this point in the history
(cherry picked from commit 69e29ed)
  • Loading branch information
nicolasstucki authored and griggt committed Apr 9, 2021
1 parent 4c7f2aa commit 25fdf1b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ object BooleanMacro {
def unapply(t: Term): Option[Term] = t match {
case Block(
ddef @
DefDef(_, (ValDef(name, _, _) :: Nil) :: Nil, _,
DefDef(_, TermParamClause(param :: Nil) :: Nil, _,
Some(Apply(Select(lhs, "=="), rhs :: Nil))
) :: Nil,
clos
) if (clos.tpe.isFunctionType) => // walkaround: https://github.com/lampepfl/dotty/issues/6720
(lhs, rhs) match {
case (Ident(refName), _) if refName == name => Some(rhs)
case (_, Ident(refName)) if refName == name => Some(lhs)
case (Ident(refName), _) if refName == param.name => Some(rhs)
case (_, Ident(refName)) if refName == param.name => Some(lhs)
case _ => None
}
case _ => None
Expand Down

0 comments on commit 25fdf1b

Please sign in to comment.