We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a210f6 commit b829b72Copy full SHA for b829b72
compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala
@@ -244,9 +244,12 @@ object QuoteMatcher {
244
case Select(qual2, _) if symbolMatch(scrutinee, pattern) =>
245
ref match
246
case Select(qual1, _) => qual1 =?= qual2
247
- case ref: Ident if qual2.symbol == defn.QuotedRuntimePatterns_patternHole =>
248
- tpd.desugarIdentPrefix(ref) =?= qual2
249
- case ref: Ident => matched
+ case ref: Ident =>
+ if qual2.existsSubTree(_.symbol == defn.QuotedRuntimePatterns_patternHole) then
+ // Prefix has a hole, so we need to match the prefix to extract the value of the hole
250
+ tpd.desugarIdentPrefix(ref) =?= qual2
251
+ else
252
+ matched
253
254
/* Match reference */
255
case _: Ident if symbolMatch(scrutinee, pattern) => matched
0 commit comments