Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ class CompletionProvider(
* 4| $1$.sliding@@[Int](size, step)
*
*/
if qual.symbol.is(Flags.Synthetic) && qual.symbol.name.isInstanceOf[DerivedName] =>
if qual.symbol.is(Flags.Synthetic) && qual.span.isZeroExtent && qual.symbol.name.isInstanceOf[DerivedName] =>
qual.symbol.defTree match
case valdef: ValDef => Select(valdef.rhs, name) :: tail
case valdef: ValDef if !valdef.rhs.isEmpty => Select(valdef.rhs, name) :: tail
case _ => tpdPath0
case _ => tpdPath0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2134,3 +2134,14 @@ class CompletionSuite extends BaseCompletionSuite:
"""|build: Unit
|""".stripMargin,
)

@Test def i7191 =
check(
"""|val x = Some(3).map(_.@@)
|""".stripMargin,
"""|!=(x: Byte): Boolean
|!=(x: Char): Boolean
|!=(x: Double): Boolean
|""".stripMargin,
topLines = Some(3)
)