File tree Expand file tree Collapse file tree 2 files changed +6
-16
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,7 @@ object Contexts {
107
107
* of all class fields of type context; allow them only in whitelisted
108
108
* classes (which should be short-lived).
109
109
*/
110
- abstract class Context (val base : ContextBase )
111
- extends Printers { thiscontext =>
110
+ abstract class Context (val base : ContextBase ) { thiscontext =>
112
111
113
112
given Context = this
114
113
@@ -221,6 +220,11 @@ object Contexts {
221
220
/** The current plain printer */
222
221
def printerFn : Context => Printer = store(printerFnLoc)
223
222
223
+ /** A function creating a printer */
224
+ def printer : Printer =
225
+ val pr = printerFn(this )
226
+ if this .settings.YplainPrinter .value then pr.plain else pr
227
+
224
228
/** The current settings values */
225
229
def settingsState : SettingsState = store(settingsStateLoc)
226
230
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments