diff --git a/plugins/kotlin/completion/testData/weighers/basic/expectedType/destructuring.kt b/plugins/kotlin/completion/testData/weighers/basic/expectedType/destructuring.kt new file mode 100644 index 000000000000..26d1fab1259b --- /dev/null +++ b/plugins/kotlin/completion/testData/weighers/basic/expectedType/destructuring.kt @@ -0,0 +1,11 @@ +val somePrefixA: Int = 5 +val somePrefixB: Pair = 1 to true +val somePrefixC: Int = 5 + +fun testDestructuring() { + val (a: Int, b: Boolean) = somePrefix +} + +// ORDER: somePrefixB, somePrefixA, somePrefixC +// IGNORE_K1 +// IGNORE_K2 \ No newline at end of file diff --git a/plugins/kotlin/completion/tests-k1/test/org/jetbrains/kotlin/idea/completion/test/weighers/BasicCompletionWeigherTestGenerated.java b/plugins/kotlin/completion/tests-k1/test/org/jetbrains/kotlin/idea/completion/test/weighers/BasicCompletionWeigherTestGenerated.java index 3d76a0d329fb..7b69bad8a2cb 100644 --- a/plugins/kotlin/completion/tests-k1/test/org/jetbrains/kotlin/idea/completion/test/weighers/BasicCompletionWeigherTestGenerated.java +++ b/plugins/kotlin/completion/tests-k1/test/org/jetbrains/kotlin/idea/completion/test/weighers/BasicCompletionWeigherTestGenerated.java @@ -346,6 +346,11 @@ public abstract class BasicCompletionWeigherTestGenerated extends AbstractBasicC KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } + @TestMetadata("destructuring.kt") + public void testDestructuring() throws Exception { + runTest("../testData/weighers/basic/expectedType/destructuring.kt"); + } + @TestMetadata("ifConditionQualified.kt") public void testIfConditionQualified() throws Exception { runTest("../testData/weighers/basic/expectedType/ifConditionQualified.kt"); diff --git a/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/completion/wheigher/HighLevelWeigherTestGenerated.java b/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/completion/wheigher/HighLevelWeigherTestGenerated.java index a90fbb47b625..edd7f4f19b9f 100644 --- a/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/completion/wheigher/HighLevelWeigherTestGenerated.java +++ b/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/completion/wheigher/HighLevelWeigherTestGenerated.java @@ -346,6 +346,11 @@ public abstract class HighLevelWeigherTestGenerated extends AbstractHighLevelWei KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } + @TestMetadata("destructuring.kt") + public void testDestructuring() throws Exception { + runTest("../../completion/testData/weighers/basic/expectedType/destructuring.kt"); + } + @TestMetadata("ifConditionQualified.kt") public void testIfConditionQualified() throws Exception { runTest("../../completion/testData/weighers/basic/expectedType/ifConditionQualified.kt");