File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed
src/main/dotty/tools/pc/completions
test/dotty/tools/pc/tests/completion Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,9 @@ class Completions(
238
238
.filter(_.symbol.isAccessibleFrom(denot.info))
239
239
constructors -> true
240
240
241
- else if shouldAddSnippet && completionMode.is(Mode .Term ) && sym.name.isTermName && ! sym.is(Flags .Method ) && ! sym.is(Flags .JavaDefined ) then
241
+ else if shouldAddSnippet && completionMode.is(Mode .Term ) && sym.name.isTermName &&
242
+ ! sym.is(Flags .JavaDefined ) && (sym.isClass || sym.is(Module ) || (sym.isField && denot.info.isInstanceOf [TermRef ])) then
243
+
242
244
val constructors = if sym.isAllOf(ConstructorProxyModule ) then
243
245
sym.companionClass.info.member(nme.CONSTRUCTOR ).allSymbols
244
246
else
Original file line number Diff line number Diff line change @@ -305,7 +305,6 @@ class CompletionDocSuite extends BaseCompletionSuite:
305
305
| }
306
306
|}
307
307
""" .stripMargin,
308
- """ |myNumbers(i: Int): Int
309
- |myNumbers: Vector[Int]
308
+ """ |myNumbers: Vector[Int]
310
309
|""" .stripMargin
311
310
)
Original file line number Diff line number Diff line change @@ -1627,8 +1627,7 @@ class CompletionSuite extends BaseCompletionSuite:
1627
1627
| val fooBar = List(123)
1628
1628
| foo@@
1629
1629
|""" .stripMargin,
1630
- """ |fooBar(n: Int): Int
1631
- |fooBar: List[Int]
1630
+ """ |fooBar: List[Int]
1632
1631
|""" .stripMargin
1633
1632
)
1634
1633
Original file line number Diff line number Diff line change @@ -810,7 +810,6 @@ class CompletionWorkspaceSuite extends BaseCompletionSuite:
810
810
|}
811
811
|""" .stripMargin,
812
812
""" |fooBar: String
813
- |fooBar(n: Int): Int - test.A
814
813
|fooBar: List[Int]
815
814
|""" .stripMargin,
816
815
)
You can’t perform that action at this time.
0 commit comments