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 8bb9c84 commit 8b7a7eaCopy full SHA for 8b7a7ea
compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala
@@ -683,9 +683,16 @@ class CompilingInterpreter(
683
code.print(resultExtractors.mkString(""))
684
}
685
686
+ private val ListReg = """^.*List\[(\w+)\]$""".r
687
+ private val MapReg = """^.*Map\[(\w+),[ ]*(\w+)\]$""".r
688
+
689
private def resultExtractor(req: Request, varName: Name): String = {
690
val prettyName = varName.decode
- val varType = string2code(req.typeOf(varName))
691
+ val varType = string2code(req.typeOf(varName)) match {
692
+ case ListReg(param) => s"List[$param]"
693
+ case MapReg(k, v) => s"Map[$k, $v]"
694
+ case x => x
695
+ }
696
val fullPath = req.fullPath(varName)
697
698
val varOrVal = statement match {
0 commit comments