File tree 4 files changed +9
-5
lines changed
test/dotty/tools/pc/tests/completion
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:
69
69
fullDocstring(tr.symbol, search)
70
70
case _ =>
71
71
" "
72
+ else if gsym.isTerm && gsym.info.typeSymbol.is(Module ) then
73
+ fullDocstring(gsym.info.typeSymbol.companion, search)
72
74
else " "
73
75
else gsymDoc
74
76
else
Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ object CompletionValue:
100
100
s " ${labelWithSuffix(printer)} - ${description(printer)}"
101
101
else s " ${labelWithSuffix(printer)}${description(printer)}"
102
102
else if symbol.isType then labelWithSuffix(printer)
103
+ else if symbol.isTerm && symbol.info.typeSymbol.is(Module ) then
104
+ s " ${label}${description(printer)}"
103
105
else s " $label: ${description(printer)}"
104
106
105
107
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:
214
214
""" .stripMargin,
215
215
"""
216
216
|> Found documentation for scala/package.Vector.
217
- |Vector: scala.collection.immutable
217
+ |Vector scala.collection.immutable
218
218
|""" .stripMargin,
219
219
includeDocs = true
220
220
)
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class CompletionSuite extends BaseCompletionSuite:
25
25
| Lis@@
26
26
|}""" .stripMargin,
27
27
"""
28
- |List: scala.collection.immutable
28
+ |List scala.collection.immutable
29
29
|List - java.awt
30
30
|List - java.util
31
31
|List - scala.collection.immutable
@@ -647,7 +647,7 @@ class CompletionSuite extends BaseCompletionSuite:
647
647
|}
648
648
| """ .stripMargin,
649
649
""" |None scala
650
- |NoManifest: scala.reflect
650
+ |NoManifest scala.reflect
651
651
|""" .stripMargin,
652
652
topLines = Some (2 )
653
653
)
@@ -660,8 +660,8 @@ class CompletionSuite extends BaseCompletionSuite:
660
660
|}
661
661
| """ .stripMargin,
662
662
""" |Some(value) scala
663
- |Seq: scala.collection.immutable
664
- |Set: scala.collection.immutable
663
+ |Seq scala.collection.immutable
664
+ |Set scala.collection.immutable
665
665
|""" .stripMargin,
666
666
topLines = Some (3 )
667
667
)
You can’t perform that action at this time.
0 commit comments