diff --git a/library/src/scala/internal/quoted/Matcher.scala b/library/src/scala/internal/quoted/Matcher.scala index ea16027cae93..26608fa654f5 100644 --- a/library/src/scala/internal/quoted/Matcher.scala +++ b/library/src/scala/internal/quoted/Matcher.scala @@ -175,8 +175,8 @@ private[quoted] object Matcher { case (Literal(constant1), Literal(constant2)) if constant1 == constant2 => matched - case (Typed(expr1, tpt1), Typed(expr2, tpt2)) => - expr1 =?= expr2 && tpt1 =?= tpt2 + case (Typed(expr1, _), pattern) => + expr1 =?= pattern case (scrutinee, Typed(expr2, _)) => scrutinee =?= expr2 diff --git a/tests/run-macros/quote-matcher-runtime.check b/tests/run-macros/quote-matcher-runtime.check index 2cab7037b4b6..e292c17d8a02 100644 --- a/tests/run-macros/quote-matcher-runtime.check +++ b/tests/run-macros/quote-matcher-runtime.check @@ -8,7 +8,7 @@ Result: None Scrutinee: (1: scala.Int) Pattern: 1 -Result: None +Result: Some(List()) Scrutinee: (1: scala.Int) Pattern: (1: scala.Int)