[REPL] Add completion for the call named parameters

This commit is contained in:
Ilya Muradyan
2021-05-04 04:40:00 +03:00
parent 0c77565104
commit b771f9eea4
2 changed files with 53 additions and 17 deletions
@@ -109,6 +109,24 @@ class ReplCompletionAndErrorsAnalysisTest : TestCase() {
}
}
@Test
fun testFunctionArgumentNames() = test {
run {
doCompile
code = """fun _sf(_someInt: Int = 42, _someString: String = "s") = 1"""
}
run {
doComplete
code = """_sf(_s"""
cursor = code.length
expect {
addCompletion("_sf(", "_sf(Int = ..., String = ...)", "Int", "method")
addCompletion("_someInt = ", "_someInt", "Int", "parameter")
addCompletion("_someString = ", "_someString", "String", "parameter")
}
}
}
@Test
fun testExtensionMethods() = test {
run {