Skip to content

Commit 6dd57bf

Browse files
committed
IDE: Don't respond to hover on value with ErrorType
We should already have the error message from a publishDiagnostics, so this is just redundant and can be confusing.
1 parent 0fcbfdb commit 6dd57bf

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)