diff --git a/mtags/src/main/scala-2/scala/meta/internal/pc/PcDefinitionProvider.scala b/mtags/src/main/scala-2/scala/meta/internal/pc/PcDefinitionProvider.scala index 0b49c51a36e..10a9e9e7b19 100644 --- a/mtags/src/main/scala-2/scala/meta/internal/pc/PcDefinitionProvider.scala +++ b/mtags/src/main/scala-2/scala/meta/internal/pc/PcDefinitionProvider.scala @@ -2,7 +2,6 @@ package scala.meta.internal.pc import java.{util => ju} -import scala.meta.internal.mtags.MtagsEnrichments._ import scala.meta.internal.semanticdb.Scala._ import scala.meta.pc.DefinitionResult import scala.meta.pc.OffsetParams @@ -55,7 +54,7 @@ class PcDefinitionProvider(val compiler: MetalsGlobal, params: OffsetParams) { } private def definition(findTypeDef: Boolean): DefinitionResult = { - if (params.isWhitespace || params.isDelimiter || params.offset() == 0) { + if (params.offset() == 0) { DefinitionResultImpl.empty } else { val unit = addCompilationUnit( diff --git a/tests/cross/src/test/scala/tests/typedef/TypeDefinitionSuite.scala b/tests/cross/src/test/scala/tests/typedef/TypeDefinitionSuite.scala index 3883247fe40..14dc2482d8e 100644 --- a/tests/cross/src/test/scala/tests/typedef/TypeDefinitionSuite.scala +++ b/tests/cross/src/test/scala/tests/typedef/TypeDefinitionSuite.scala @@ -395,4 +395,13 @@ class TypeDefinitionSuite extends BasePcDefinitionSuite { |""".stripMargin ) + check( + "backticked identifier", + """| + |class Main { + | def `Foo/*scala/Int# Int.scala*/@@ Bar` = 1 + 2 + |} + |""".stripMargin + ) + }