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 b666323 commit a125c67Copy full SHA for a125c67
compiler/src/dotty/tools/dotc/core/Decorators.scala
@@ -176,7 +176,10 @@ object Decorators {
176
}
177
178
implicit class genericDeco[T](val x: T) extends AnyVal {
179
- def reporting(op: T => String): T = { println(op(x)); x }
+ def reporting(op: T => String, printer: config.Printers.Printer = config.Printers.default): T = {
180
+ printer.println(op(x))
181
+ x
182
+ }
183
def assertingErrorsReported(implicit ctx: Context): T = {
184
assert(ctx.reporter.errorsReported)
185
x
0 commit comments