Skip to content

Commit

Permalink
adjust for Java 8 and fix doc test
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Jan 22, 2025
1 parent 9a028cd commit d1a150a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,14 @@ case class ScalaPresentationCompiler(
params match {
case range: RangeParams =>
extractMethod(range, extractionPos)
case _ =>
CompletableFuture.failedFuture(
new IllegalArgumentException(s"Expected range parameters")
)
case _ => failedFuture(new IllegalArgumentException(s"Expected range parameters"))
}
case (id, _) =>
CompletableFuture.failedFuture(
new IllegalArgumentException(s"Unsupported action id $id")
)
case (id, _) => failedFuture(new IllegalArgumentException(s"Unsupported action id $id"))

private def failedFuture[T](e: Throwable): CompletableFuture[T] =
val f = new CompletableFuture[T]()
f.completeExceptionally(e)
f

override def withCompletionItemPriority(
priority: CompletionItemPriority
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class HoverNamedArgSuite extends BaseHoverSuite:
"""|```scala
|named: Int
|```
|Found documentation for a/b.foo().(named)
|""".stripMargin
)

Expand Down

0 comments on commit d1a150a

Please sign in to comment.