Skip to content

Commit a125c67

Browse files
committed
Refactor Inliner
Several refactorings for clarity and legibility; no change in functionality.
1 parent b666323 commit a125c67

File tree

2 files changed

+199
-194
lines changed

2 files changed

+199
-194
lines changed

compiler/src/dotty/tools/dotc/core/Decorators.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ object Decorators {
176176
}
177177

178178
implicit class genericDeco[T](val x: T) extends AnyVal {
179-
def reporting(op: T => String): T = { println(op(x)); x }
179+
def reporting(op: T => String, printer: config.Printers.Printer = config.Printers.default): T = {
180+
printer.println(op(x))
181+
x
182+
}
180183
def assertingErrorsReported(implicit ctx: Context): T = {
181184
assert(ctx.reporter.errorsReported)
182185
x

0 commit comments

Comments
 (0)