Smart completion: expected type instantiation made higher priority than static members
This commit is contained in:
@@ -268,8 +268,8 @@ enum class SmartCompletionItemPriority {
|
|||||||
THIS
|
THIS
|
||||||
DEFAULT
|
DEFAULT
|
||||||
NULLABLE
|
NULLABLE
|
||||||
STATIC_MEMBER
|
|
||||||
INSTANTIATION
|
INSTANTIATION
|
||||||
|
STATIC_MEMBER
|
||||||
ANONYMOUS_OBJECT
|
ANONYMOUS_OBJECT
|
||||||
LAMBDA_NO_PARAMS
|
LAMBDA_NO_PARAMS
|
||||||
LAMBDA
|
LAMBDA
|
||||||
|
|||||||
@@ -11,5 +11,5 @@ fun bar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ORDER: it
|
// ORDER: it
|
||||||
// ORDER: create
|
|
||||||
// ORDER: Name
|
// ORDER: Name
|
||||||
|
// ORDER: create
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
class C {
|
||||||
|
companion object {
|
||||||
|
val INSTANCE = C()
|
||||||
|
fun create() = C()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(p: C) {
|
||||||
|
foo(<caret>)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ORDER: p
|
||||||
|
// ORDER: C
|
||||||
|
// ORDER: INSTANCE
|
||||||
|
// ORDER: create
|
||||||
+6
@@ -203,4 +203,10 @@ public class SmartCompletionWeigherTestGenerated extends AbstractSmartCompletion
|
|||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/completion/weighers/smart/SmartPriority2.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/completion/weighers/smart/SmartPriority2.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("SmartPriority3.kt")
|
||||||
|
public void testSmartPriority3() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/completion/weighers/smart/SmartPriority3.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user