@@ -18,7 +18,7 @@ import scala.io.Codec
18
18
19
19
import dotc ._
20
20
import ast .{Trees , tpd }
21
- import core ._ , core .Decorators .{ sourcePos => _ , _ }
21
+ import core ._ , core .Decorators ._
22
22
import Annotations .AnnotInfo
23
23
import Comments ._ , Constants ._ , Contexts ._ , Flags ._ , Names ._ , NameOps ._ , Symbols ._ , SymDenotations ._ , Trees ._ , Types ._
24
24
import classpath .ClassPathEntries
@@ -388,7 +388,7 @@ class DottyLanguageServer extends LanguageServer
388
388
val refs =
389
389
path match {
390
390
// Selected a renaming in an import node
391
- case Thicket (_ :: (rename : Ident ) :: Nil ) :: (_ : Import ) :: rest if rename.pos .contains(pos.pos ) =>
391
+ case Thicket (_ :: (rename : Ident ) :: Nil ) :: (_ : Import ) :: rest if rename.span .contains(pos.span ) =>
392
392
findRenamedReferences(uriTrees, syms, rename.name)
393
393
394
394
// Selected a reference that has been renamed
@@ -545,7 +545,7 @@ class DottyLanguageServer extends LanguageServer
545
545
val trees = driver.openedTrees(uri)
546
546
val path = Interactive .pathTo(trees, pos).dropWhile(! _.isInstanceOf [Apply ])
547
547
548
- val (paramN, callableN, alternatives) = Signatures .callInfo(path, pos.pos )
548
+ val (paramN, callableN, alternatives) = Signatures .callInfo(path, pos.span )
549
549
val signatureInfos = alternatives.flatMap(Signatures .toSignature)
550
550
551
551
new SignatureHelp (signatureInfos.map(signatureToSignatureInformation).asJava, callableN, paramN)
@@ -754,7 +754,7 @@ object DottyLanguageServer {
754
754
* @return The position in the actual source file (before wrapping).
755
755
*/
756
756
private def toUnwrappedPosition (position : SourcePosition ): SourcePosition = {
757
- new SourcePosition (position.source, position.pos , position.outer) {
757
+ new SourcePosition (position.source, position.span , position.outer) {
758
758
override def startLine : Int = position.startLine - 1
759
759
override def endLine : Int = position.endLine - 1
760
760
}
0 commit comments