File tree 3 files changed +15
-5
lines changed
src/dotty/tools/dotc/interactive
test/dotty/tools/dotc/interactive
language-server/test/dotty/tools/languageserver 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,12 @@ object Completion {
114
114
val completions = path match {
115
115
// Ignore synthetic select from `This` because in code it was `Ident`
116
116
// See example in dotty.tools.languageserver.CompletionTest.syntheticThis
117
- case Select (qual @ This (_), _) :: _ if qual.span.isSynthetic => completer.scopeCompletions
118
- case Select (qual, _) :: _ => completer.selectionCompletions(qual)
119
- case Import (expr, _) :: _ => completer.directMemberCompletions(expr)
120
- case (_ : untpd.ImportSelector ) :: Import (expr, _) :: _ => completer.directMemberCompletions(expr)
121
- case _ => completer.scopeCompletions
117
+ case Select (qual @ This (_), _) :: _ if qual.span.isSynthetic => completer.scopeCompletions
118
+ case Select (qual, _) :: _ if qual.tpe.hasSimpleKind => completer.selectionCompletions(qual)
119
+ case Select (qual, _) :: _ => Map .empty
120
+ case Import (expr, _) :: _ => completer.directMemberCompletions(expr)
121
+ case (_ : untpd.ImportSelector ) :: Import (expr, _) :: _ => completer.directMemberCompletions(expr)
122
+ case _ => completer.scopeCompletions
122
123
}
123
124
124
125
val describedCompletions = describeCompletions(completions)
Original file line number Diff line number Diff line change @@ -169,3 +169,4 @@ class CustomCompletionTests extends DottyTest:
169
169
170
170
assert(offset == prefix.length)
171
171
assert(labels.contains(" scala.Function2" ))
172
+
Original file line number Diff line number Diff line change @@ -887,4 +887,12 @@ class CompletionTest {
887
887
)
888
888
)
889
889
}
890
+
891
+ @ Test def i12465_hkt : Unit =
892
+ code """ ???.asInstanceOf[scala.collection.Seq]. ${m1}""" .withSource
893
+ .completion(m1, Set ())
894
+
895
+ @ Test def i12465_hkt_alias : Unit =
896
+ code """ ???.asInstanceOf[Seq]. ${m1}""" .withSource
897
+ .completion(m1, Set ())
890
898
}
You can’t perform that action at this time.
0 commit comments