File tree 2 files changed +22
-5
lines changed
src/main/dotty/tools/pc/utils
test/dotty/tools/pc/tests/hover
2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 1
1
package dotty .tools .pc .utils
2
2
3
+ import java .util .Optional
4
+
3
5
import scala .annotation .tailrec
4
6
import scala .meta .internal .jdk .CollectionConverters .*
5
7
import scala .meta .internal .mtags .CommonMtagsEnrichments
@@ -272,11 +274,14 @@ object InteractiveEnrichments extends CommonMtagsEnrichments:
272
274
symbol.maybeOwner.companion,
273
275
).filter(_ != NoSymbol ) ++ symbol.allOverriddenSymbols
274
276
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
+ )
280
285
documentation.nn.toScala
281
286
end symbolDocumentation
282
287
end extension
Original file line number Diff line number Diff line change @@ -254,3 +254,15 @@ class HoverDocSuite extends BaseHoverSuite:
254
254
|Found documentation for _empty_/Alpha#
255
255
|""" .stripMargin,
256
256
)
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