File tree 2 files changed +13
-2
lines changed
src/main/dotty/tools/pc/completions
test/dotty/tools/pc/tests/completion
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,9 @@ class CompletionProvider(
99
99
* 4| $1$.sliding@@[Int](size, step)
100
100
*
101
101
*/
102
- if qual.symbol.is(Flags .Synthetic ) && qual.symbol.name.isInstanceOf [DerivedName ] =>
102
+ if qual.symbol.is(Flags .Synthetic ) && qual.span.isZeroExtent && qual. symbol.name.isInstanceOf [DerivedName ] =>
103
103
qual.symbol.defTree match
104
- case valdef : ValDef => Select (valdef.rhs, name) :: tail
104
+ case valdef : ValDef if ! valdef.rhs.isEmpty => Select (valdef.rhs, name) :: tail
105
105
case _ => tpdPath0
106
106
case _ => tpdPath0
107
107
Original file line number Diff line number Diff line change @@ -2134,3 +2134,14 @@ class CompletionSuite extends BaseCompletionSuite:
2134
2134
""" |build: Unit
2135
2135
|""" .stripMargin,
2136
2136
)
2137
+
2138
+ @ Test def i7191 =
2139
+ check(
2140
+ """ |val x = Some(3).map(_.@@)
2141
+ |""" .stripMargin,
2142
+ """ |!=(x: Byte): Boolean
2143
+ |!=(x: Char): Boolean
2144
+ |!=(x: Double): Boolean
2145
+ |""" .stripMargin,
2146
+ topLines = Some (3 )
2147
+ )
You can’t perform that action at this time.
0 commit comments