diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala b/compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala index e0fda8258..7fe3d815d 100644 --- a/compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala +++ b/compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala @@ -685,12 +685,15 @@ class CompilingInterpreter( private val ListReg = """^.*List\[(\w+)\]$""".r private val MapReg = """^.*Map\[(\w+),[ ]*(\w+)\]$""".r + private val LitReg = """^.*\((.+)\)$""".r private def resultExtractor(req: Request, varName: Name): String = { val prettyName = varName.decode val varType = string2code(req.typeOf(varName)) match { case ListReg(param) => s"List[$param]" case MapReg(k, v) => s"Map[$k, $v]" + case LitReg(lit) => lit + case x if x.lastOption == Some('$') => x.init + ".type" case x => x } val fullPath = req.fullPath(varName) |