Smart completion: expected type instantiation made higher priority than static members
This commit is contained in:
@@ -268,8 +268,8 @@ enum class SmartCompletionItemPriority {
|
||||
THIS
|
||||
DEFAULT
|
||||
NULLABLE
|
||||
STATIC_MEMBER
|
||||
INSTANTIATION
|
||||
STATIC_MEMBER
|
||||
ANONYMOUS_OBJECT
|
||||
LAMBDA_NO_PARAMS
|
||||
LAMBDA
|
||||
|
||||
@@ -11,5 +11,5 @@ fun bar() {
|
||||
}
|
||||
|
||||
// ORDER: it
|
||||
// ORDER: create
|
||||
// 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");
|
||||
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