KT-12669 Completion should show variant with () when there is default lambda
#KT-12669
This commit is contained in:
+5
@@ -1,6 +1,7 @@
|
||||
fun xfoo1(option1: String = "", option2: Int = 1, p: () -> Unit){}
|
||||
fun xfoo2(option1: String = "", option2: Int = 1, p: (Int) -> Boolean){}
|
||||
fun xfoo3(option1: String = "", option2: Int = 1, p: (String, Char) -> Unit){}
|
||||
fun xfoo4(p: () -> Unit = {}){}
|
||||
|
||||
fun xfooBad1(option: String = "", notOption: Int, p: (String, Char) -> Unit){}
|
||||
fun xfooBad2(option1: String = "", option2: Int = 1, p: (String, Char) -> Unit, option3: Int = 0){}
|
||||
@@ -18,6 +19,10 @@ fun test(param: () -> Unit) {
|
||||
// EXIST: { itemText: "xfoo3", tailText: "(option1: String = ..., option2: Int = ..., p: (String, Char) -> Unit) (<root>)", typeText:"Unit" }
|
||||
// EXIST: { itemText: "xfoo3", tailText: " { String, Char -> ... } (..., p: (String, Char) -> Unit) (<root>)", typeText:"Unit" }
|
||||
|
||||
// EXIST: { itemText: "xfoo4", tailText: "(p: () -> Unit = ...) (<root>)", typeText:"Unit" }
|
||||
// EXIST: { itemText: "xfoo4", tailText: " {...} (p: () -> Unit = ...) (<root>)", typeText:"Unit" }
|
||||
// EXIST: { itemText: "xfoo4", tailText: "(param) (<root>)", typeText:"Unit" }
|
||||
|
||||
// EXIST: { itemText: "xfooBad1", tailText: "(option: String = ..., notOption: Int, p: (String, Char) -> Unit) (<root>)", typeText:"Unit" }
|
||||
|
||||
// EXIST: { itemText: "xfooBad2", tailText: "(option1: String = ..., option2: Int = ..., p: (String, Char) -> Unit, option3: Int = ...) (<root>)", typeText:"Unit" }
|
||||
|
||||
Reference in New Issue
Block a user