File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
src/main/dotty/tools/pc/completions
test/dotty/tools/pc/tests/completion Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ object KeywordsCompletions:
216216 case untpd.TypeDef (_, template : Template ) => checkForPossibleKeywords(template)
217217 case untpd.ModuleDef (_, template : Template ) => checkForPossibleKeywords(template)
218218 case template : Template => checkForPossibleKeywords(template)
219+ case _ => TemplateKeywordAvailability .default
219220 }.getOrElse(TemplateKeywordAvailability .default)
220221
221222
Original file line number Diff line number Diff line change @@ -2057,7 +2057,7 @@ class CompletionSuite extends BaseCompletionSuite:
20572057 |""" .stripMargin
20582058 )
20592059
2060- @ Test def `conflict-3` =
2060+ @ Test def `conflict-3` =
20612061 check(
20622062 """ |package a
20632063 |object A {
@@ -2116,3 +2116,21 @@ class CompletionSuite extends BaseCompletionSuite:
21162116 |""" .stripMargin,
21172117 assertSingleItem = false
21182118 )
2119+
2120+ @ Test def `metals-i6861` =
2121+ check(
2122+ """ |trait Builder[Alg]:
2123+ | def withTraces: String
2124+ |
2125+ |trait BuilderFactory:
2126+ | def transformRouter(f: [Alg] => Builder[Alg] => String): BuilderFactory
2127+ | def build: Unit
2128+ |
2129+ |def demo =
2130+ | (??? : BuilderFactory)
2131+ | .transformRouter([Alg] => (builder: Builder[Alg]) => builder.withTraces)
2132+ | .build@@
2133+ |""" .stripMargin,
2134+ """ |build: Unit
2135+ |""" .stripMargin,
2136+ )
You can’t perform that action at this time.
0 commit comments