@@ -26,9 +26,6 @@ private[repl] class Rendering(parentClassLoader: Option[ClassLoader] = None):
26
26
27
27
var myClassLoader : AbstractFileClassLoader = uninitialized
28
28
29
- /** (value, maxElements, maxCharacters) => String */
30
- val myReplStringOf : (Object , Int , Int ) => String =
31
- dotty.shaded.pprint.PPrinter .BlackWhite .apply(value).plainText
32
29
33
30
/** Class loader used to load compiled code */
34
31
private [repl] def classLoader ()(using Context ) =
@@ -57,17 +54,7 @@ private[repl] class Rendering(parentClassLoader: Option[ClassLoader] = None):
57
54
58
55
/** Return a String representation of a value we got from `classLoader()`. */
59
56
private [repl] def replStringOf (sym : Symbol , value : Object )(using Context ): String =
60
- assert(myReplStringOf != null ,
61
- " replStringOf should only be called on values creating using `classLoader()`, but `classLoader()` has not been called so far" )
62
- val maxPrintElements = ctx.settings.VreplMaxPrintElements .valueIn(ctx.settingsState)
63
- val maxPrintCharacters = ctx.settings.VreplMaxPrintCharacters .valueIn(ctx.settingsState)
64
- // stringOf returns null if value.toString returns null. Show some text as a fallback.
65
- def fallback = s """ null // result of " ${sym.name}.toString" is null """
66
- if value == null then " null" else
67
- myReplStringOf(value, maxPrintElements, maxPrintCharacters) match
68
- case null => fallback
69
- case res => res
70
- end if
57
+ dotty.shaded.pprint.PPrinter .BlackWhite .apply(value).plainText
71
58
72
59
/** Load the value of the symbol using reflection.
73
60
*
0 commit comments