File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
test/dotty/tools/pc/tests/completion Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ object CompletionItemResolver extends ItemResolver:
6969 fullDocstring(tr.symbol, search)
7070 case _ =>
7171 " "
72+ else if gsym.isTerm && gsym.info.typeSymbol.is(Module ) then
73+ fullDocstring(gsym.info.typeSymbol.companion, search)
7274 else " "
7375 else gsymDoc
7476 else
Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ object CompletionValue:
100100 s " ${labelWithSuffix(printer)} - ${description(printer)}"
101101 else s " ${labelWithSuffix(printer)}${description(printer)}"
102102 else if symbol.isType then labelWithSuffix(printer)
103+ else if symbol.isTerm && symbol.info.typeSymbol.is(Module ) then
104+ s " ${label}${description(printer)}"
103105 else s " $label: ${description(printer)}"
104106
105107 private def labelWithSuffix (printer : ShortenedTypePrinter )(using Context ): String =
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ class CompletionDocSuite extends BaseCompletionSuite:
214214 """ .stripMargin,
215215 """
216216 |> Found documentation for scala/package.Vector.
217- |Vector: scala.collection.immutable
217+ |Vector scala.collection.immutable
218218 |""" .stripMargin,
219219 includeDocs = true
220220 )
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class CompletionSuite extends BaseCompletionSuite:
2525 | Lis@@
2626 |}""" .stripMargin,
2727 """
28- |List: scala.collection.immutable
28+ |List scala.collection.immutable
2929 |List - java.awt
3030 |List - java.util
3131 |List - scala.collection.immutable
@@ -647,7 +647,7 @@ class CompletionSuite extends BaseCompletionSuite:
647647 |}
648648 | """ .stripMargin,
649649 """ |None scala
650- |NoManifest: scala.reflect
650+ |NoManifest scala.reflect
651651 |""" .stripMargin,
652652 topLines = Some (2 )
653653 )
@@ -660,8 +660,8 @@ class CompletionSuite extends BaseCompletionSuite:
660660 |}
661661 | """ .stripMargin,
662662 """ |Some(value) scala
663- |Seq: scala.collection.immutable
664- |Set: scala.collection.immutable
663+ |Seq scala.collection.immutable
664+ |Set scala.collection.immutable
665665 |""" .stripMargin,
666666 topLines = Some (3 )
667667 )
You can’t perform that action at this time.
0 commit comments