File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
compiler/src/scala/quoted/runtime/impl Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,25 @@ object QuoteMatcher {
167
167
val scrutinee = normalize(scrutinee0)
168
168
val pattern = normalize(pattern0)
169
169
170
+ inline def notMatched [T ]: optional[T ] =
171
+ if (debug)
172
+ val quotes = QuotesImpl ()
173
+ println(
174
+ s """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
175
+ |Scrutinee
176
+ | ${scrutinee.show}
177
+ |did not match pattern
178
+ | ${pattern.show}
179
+ |
180
+ |with environment: ${summon[Env ]}
181
+ |
182
+ |Scrutinee: ${quotes.reflect.Printer .TreeStructure .show(scrutinee.asInstanceOf )}
183
+ |Pattern: ${quotes.reflect.Printer .TreeStructure .show(pattern.asInstanceOf )}
184
+ |
185
+ | """ .stripMargin)
186
+ optional.break()
187
+
188
+
170
189
/** Check that both are `val` or both are `lazy val` or both are `var` **/
171
190
def checkValFlags (): Boolean = {
172
191
val sFlags = scrutinee.symbol.flags
You can’t perform that action at this time.
0 commit comments