Skip to content

Commit ca38c12

Browse files
author
Matthew McGarvey
committed
broken test
1 parent 3cb1cfa commit ca38c12

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/test/kotlin/org/javacs/kt/CompletionsTest.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,12 @@ class EditCallTest : SingleFileTestFixture("completions", "EditCall.kt") {
249249
assertThat(completions.items.filter { it.label.startsWith("println") }.firstOrNull(), hasProperty("insertText", equalTo("println")))
250250
}
251251
}
252+
253+
class EnumWithCompanionObjectTest : SingleFileTestFixture("completions", "Enum.kt") {
254+
@Test fun `enum with companion object`() {
255+
val completions = languageServer.textDocumentService.completion(completionParams(file, 9, 15)).get().right!!
256+
val labels = completions.items.map { it.label }
257+
258+
assertThat(labels, hasItem("ILLEGAL"))
259+
}
260+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
enum class TokenType {
2+
ILLEGAL;
3+
4+
companion object {
5+
}
6+
}
7+
8+
fun tokenTypeFunc() {
9+
TokenType.
10+
}

0 commit comments

Comments
 (0)