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 @@ -2168,3 +2168,14 @@ class CompletionSuite extends BaseCompletionSuite:
2168
2168
""" |build: Unit
2169
2169
|""" .stripMargin,
2170
2170
)
2171
+
2172
+ @ Test def i7191 =
2173
+ check(
2174
+ """ |val x = Some(3).map(_.@@)
2175
+ |""" .stripMargin,
2176
+ """ |!=(x: Byte): Boolean
2177
+ |!=(x: Char): Boolean
2178
+ |!=(x: Double): Boolean
2179
+ |""" .stripMargin,
2180
+ topLines = Some (3 )
2181
+ )
You can’t perform that action at this time.
0 commit comments