Skip to content

Commit 6fd349a

Browse files
authored
Merge pull request #5352 from dotty-staging/fix-lsp-hover
IDE: Don't respond to hover on value with ErrorType
2 parents 2f685d2 + 6dd57bf commit 6fd349a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ class DottyLanguageServer extends LanguageServer
353353
val tp = Interactive.enclosingType(trees, pos)
354354
val tpw = tp.widenTermRefExpr
355355

356-
if (tpw == NoType) null // null here indicates that no response should be sent
356+
if (tp.isError || tpw == NoType) null // null here indicates that no response should be sent
357357
else {
358358
val symbol = Interactive.enclosingSourceSymbol(trees, pos)
359359
val docComment = ctx.docCtx.flatMap(_.docstring(symbol))

0 commit comments

Comments
 (0)