Skip to content

Commit 544818d

Browse files
committed
Restore debugprint
1 parent acf268e commit 544818d

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -167,25 +167,6 @@ object QuoteMatcher {
167167
val scrutinee = normalize(scrutinee0)
168168
val pattern = normalize(pattern0)
169169

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-
189170
/** Check that both are `val` or both are `lazy val` or both are `var` **/
190171
def checkValFlags(): Boolean = {
191172
val sFlags = scrutinee.symbol.flags
@@ -431,6 +412,22 @@ object QuoteMatcher {
431412
case _ =>
432413
notMatched
433414

415+
if (debug && res == notMatched)
416+
val quotes = QuotesImpl()
417+
println(
418+
s""">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
419+
|Scrutinee
420+
| ${scrutinee.show}
421+
|did not match pattern
422+
| ${pattern.show}
423+
|
424+
|with environment: ${summon[Env]}
425+
|
426+
|Scrutinee: ${quotes.reflect.Printer.TreeStructure.show(scrutinee.asInstanceOf)}
427+
|Pattern: ${quotes.reflect.Printer.TreeStructure.show(pattern.asInstanceOf)}
428+
|
429+
|""".stripMargin)
430+
434431
res
435432
end =?=
436433

0 commit comments

Comments
 (0)