Completion: escaping of named arguments

This commit is contained in:
Valentin Kipyatkov
2014-08-27 21:45:46 +04:00
parent d64f930ff1
commit 89aaa018fe
18 changed files with 63 additions and 50 deletions
@@ -3,4 +3,4 @@ fun small(param: Int) {
fun test() = small(<caret>)
// EXIST: {"lookupString":"param","tailText":"Int","itemText":"param = "}
// EXIST: {"lookupString":"param =","tailText":" Int","itemText":"param ="}
@@ -3,5 +3,5 @@ fun small(first: Int, second: Int) {
fun test() = small(12, <caret>)
// ABSENT: first
// EXIST: second
// ABSENT: "first ="
// EXIST: "second ="
@@ -7,5 +7,5 @@ fun small(paramFirst: ArrayList<String>, paramSecond: Comparable<java.lang.Runti
fun test() = small(<caret>)
// EXIST: {"lookupString":"paramSecond","tailText":"Comparable<RuntimeException>","itemText":"paramSecond = "}
// EXIST: {"lookupString":"paramFirst","tailText":"ArrayList<String>","itemText":"paramFirst = "}
// EXIST: {"lookupString":"paramSecond =","tailText":" Comparable<RuntimeException>","itemText":"paramSecond ="}
// EXIST: {"lookupString":"paramFirst =","tailText":" ArrayList<String>","itemText":"paramFirst ="}
@@ -6,6 +6,6 @@ fun small(paramFirst: Int, paramSecond: Int) {
fun test() = small(paramFirst = param<caret>)
// EXIST: paramTest
// ABSENT: {"lookupString":"paramFirst","tailText":"Int","itemText":"paramFirst = "}
// ABSENT: paramSecond
// ABSENT: {"lookupString":"paramFirst =","tailText":" Int","itemText":"paramFirst ="}
// ABSENT: "paramSecond ="
// NUMBER: 1
@@ -10,11 +10,11 @@ fun other() {
foo(n<caret>)
}
// EXIST: nFirst
// EXIST: nSecond
// EXIST: nThird
// EXIST: "nFirst ="
// EXIST: "nSecond ="
// EXIST: "nThird ="
// EXIST: nLocal
// todo - should exist
// ABSENT: nClassParam
// ABSENT: nClassField
// ABSENT: "nClassParam ="
// ABSENT: "nClassField ="
@@ -6,5 +6,5 @@ fun other() {
Foo(p<caret>)
}
// EXIST: {"lookupString":"pFirst","tailText":"String?","itemText":"pFirst = "}
// EXIST: {"lookupString":"pSecond","tailText":"Int","itemText":"pSecond = "}
// EXIST: {"lookupString":"pFirst =","tailText":" String?","itemText":"pFirst ="}
// EXIST: {"lookupString":"pSecond =","tailText":" Int","itemText":"pSecond ="}
@@ -4,8 +4,8 @@ fun test() {
foo("str", paramThird = "test", param<caret>)
}
// ABSENT: paramFirst
// EXIST: paramSecond
// ABSENT: paramThird
// EXIST: paramFourth
// ABSENT: "paramFirst ="
// EXIST: "paramSecond ="
// ABSENT: "paramThird ="
// EXIST: "paramFourth ="
@@ -5,7 +5,7 @@ fun test() {
foo(12, param<caret>)
}
// ABSENT: paramFirst
// EXIST: {"lookupString":"paramSecond","tailText":"Int","itemText":"paramSecond = "}
// ABSENT: paramThird
// ABSENT: paramFourth
// ABSENT: "paramFirst ="
// EXIST: {"lookupString":"paramSecond =","tailText":" Int","itemText":"paramSecond ="}
// ABSENT: "paramThird ="
// ABSENT: "paramFourth ="
@@ -4,6 +4,6 @@ fun foo(first: Int, second: Int, third: String) {
fun test(p: Int) = foo(12, <caret>, third = "")
// EXIST: p
// ABSENT: first
// EXIST: third
// EXIST: second
// ABSENT: "first ="
// EXIST: "third ="
// EXIST: "second ="
@@ -4,6 +4,6 @@ fun foo(first: Int, second: Int, third: String) {
fun test(p: Int) = foo(<caret>second = 3)
// EXIST: p
// EXIST: first
// EXIST: second
// EXIST: third
// EXIST: "first ="
// EXIST: "second ="
// EXIST: "third ="
@@ -4,7 +4,7 @@ fun foo(first: Int, second: Int, third: String) {
fun test(p: Int) = foo(12, third = "", <caret>)
// ABSENT: p
// ABSENT: first
// ABSENT: third
// EXIST: second
// ABSENT: "first ="
// ABSENT: "third ="
// EXIST: "second ="
// NUMBER: 1
@@ -5,8 +5,8 @@ fun small(paramFirst: Int, paramSecond: Int) {
fun test() = small(param<caret>First = 12)
// EXIST: paramFirst
// EXIST: paramSecond
// EXIST: "paramFirst ="
// EXIST: "paramSecond ="
// EXIST: paramTest
// NUMBER: 3
@@ -2,5 +2,5 @@ import lib.KotlinClass
fun test() = KotlinClass().foo(<caret>)
// ABSENT: p0
// EXIST: paramName
// ABSENT: "p0 ="
// EXIST: "paramName ="