FIR IDE: add completion weighers tests for return/if/while
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// FIR_COMPARISON
|
||||
|
||||
object x {
|
||||
val b: Boolean = true
|
||||
val c: String = "true"
|
||||
val d: Int = 1
|
||||
val e: Long = 1L
|
||||
val f: Boolean = true
|
||||
|
||||
fun foo(): Boolean = true
|
||||
}
|
||||
|
||||
|
||||
fun test() {
|
||||
if(x.<caret>){
|
||||
}
|
||||
|
||||
// ORDER: b, f, foo
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
val b: Boolean = true
|
||||
val c: String = "true"
|
||||
val d: Int = 1
|
||||
val e: Long = 1L
|
||||
val f: Boolean = true
|
||||
|
||||
fun foo(): Boolean
|
||||
|
||||
fun test(): Int {
|
||||
return <caret>
|
||||
}
|
||||
|
||||
//ORDER: test, d
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// FIR_COMPARISON
|
||||
|
||||
object x {
|
||||
val b: Boolean = true
|
||||
val c: String = "true"
|
||||
val d: Int = 1
|
||||
val e: Long = 1L
|
||||
val f: Boolean = true
|
||||
|
||||
fun foo(): Int
|
||||
}
|
||||
|
||||
fun test(): Int {
|
||||
return x.<caret>
|
||||
}
|
||||
|
||||
//ORDER: d, foo, f
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// FIR_COMPARISON
|
||||
|
||||
val a: Int
|
||||
val b: String
|
||||
val c: Long
|
||||
val d: Int
|
||||
|
||||
fun test(): Int {
|
||||
receiveLambda {
|
||||
return@receiveLambda <caret>
|
||||
}
|
||||
return 2
|
||||
}
|
||||
|
||||
fun receiveLambda(x: () -> Int){}
|
||||
|
||||
// ORDER: a, d, test
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// FIR_COMPARISON
|
||||
|
||||
object x {
|
||||
val b: Boolean = true
|
||||
val c: String = "true"
|
||||
val d: Int = 1
|
||||
val e: Long = 1L
|
||||
val f: Boolean = true
|
||||
|
||||
fun foo(): Boolean = true
|
||||
}
|
||||
|
||||
|
||||
fun x() {
|
||||
while(x.<caret>){
|
||||
}
|
||||
|
||||
// ORDER: b, f, foo
|
||||
Reference in New Issue
Block a user