File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed
src/main/dotty/tools/pc/utils
test/dotty/tools/pc/tests/hover Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 11package dotty .tools .pc .utils
22
3+ import java .util .Optional
4+
35import scala .annotation .tailrec
46import scala .meta .internal .jdk .CollectionConverters .*
57import scala .meta .internal .mtags .CommonMtagsEnrichments
@@ -272,11 +274,14 @@ object InteractiveEnrichments extends CommonMtagsEnrichments:
272274 symbol.maybeOwner.companion,
273275 ).filter(_ != NoSymbol ) ++ symbol.allOverriddenSymbols
274276 else symbol.allOverriddenSymbols
275- val documentation = search.documentation(
276- sym,
277- () => parentSymbols.iterator.map(toSemanticdbSymbol).toList.asJava,
278- contentType,
279- )
277+ val documentation =
278+ if symbol.isLocal then Optional .empty
279+ else
280+ search.documentation(
281+ sym,
282+ () => parentSymbols.iterator.map(toSemanticdbSymbol).toList.asJava,
283+ contentType,
284+ )
280285 documentation.nn.toScala
281286 end symbolDocumentation
282287 end extension
Original file line number Diff line number Diff line change @@ -254,3 +254,15 @@ class HoverDocSuite extends BaseHoverSuite:
254254 |Found documentation for _empty_/Alpha#
255255 |""" .stripMargin,
256256 )
257+
258+ @ Test def `i7093` =
259+ check(
260+ """ |object O:
261+ | /** Ooopsie daisy */
262+ | val computeLogicOwners: Unit =
263+ | /** This is a comment */
264+ | <<def logi@@cOwners = ???>>
265+ | ???
266+ |""" .stripMargin,
267+ """ def logicOwners: Nothing""" .hover.stripMargin
268+ )
You can’t perform that action at this time.
0 commit comments