Skip to content

Commit 784601f

Browse files
Merge pull request #4967 from dotty-staging/tests-for-2864
Add test for #2864
2 parents 33afaa2 + 77f891b commit 784601f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

language-server/test/dotty/tools/languageserver/CompletionTest.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,12 @@ class CompletionTest {
1111
code"class Foo { val xyz: Int = 0; def y: Int = xy$m1 }".withSource
1212
.completion(m1, Set(("xyz", CompletionItemKind.Field, "Int")))
1313
}
14+
15+
@Test def completionWithImplicitConversion: Unit = {
16+
withSources(
17+
code"object Foo { implicit class WithBaz(bar: Bar) { def baz = 0 } }",
18+
code"class Bar",
19+
code"object Main { import Foo._; val bar: Bar = new Bar; bar.b${m1} }"
20+
) .completion(m1, Set(("baz", CompletionItemKind.Method, "=> Int")))
21+
}
1422
}

0 commit comments

Comments
 (0)