From c9bde2de0e3934909a47819a4310031bf1205c7d Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Mon, 12 May 2014 20:55:00 +0400 Subject: [PATCH] Smart completion: added a test --- idea/testData/completion/smart/IfValue4.kt | 12 ++++++++++++ .../completion/JvmSmartCompletionTestGenerated.java | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 idea/testData/completion/smart/IfValue4.kt diff --git a/idea/testData/completion/smart/IfValue4.kt b/idea/testData/completion/smart/IfValue4.kt new file mode 100644 index 00000000000..7b56d849bbc --- /dev/null +++ b/idea/testData/completion/smart/IfValue4.kt @@ -0,0 +1,12 @@ +fun foo(s: String){} +fun foo(c: Char){} + +val xxx: XXX + +fun bar(b: Boolean, s: String, c: Char){ + foo(if (b) xxx else ) +} + +// EXIST: s +// EXIST: c +// ABSENT: b diff --git a/idea/tests/org/jetbrains/jet/completion/JvmSmartCompletionTestGenerated.java b/idea/tests/org/jetbrains/jet/completion/JvmSmartCompletionTestGenerated.java index e0b21712d2d..9c9e8ef7779 100644 --- a/idea/tests/org/jetbrains/jet/completion/JvmSmartCompletionTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/completion/JvmSmartCompletionTestGenerated.java @@ -216,6 +216,11 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT doTest("idea/testData/completion/smart/IfValue3.kt"); } + @TestMetadata("IfValue4.kt") + public void testIfValue4() throws Exception { + doTest("idea/testData/completion/smart/IfValue4.kt"); + } + @TestMetadata("IfValueInBlock1.kt") public void testIfValueInBlock1() throws Exception { doTest("idea/testData/completion/smart/IfValueInBlock1.kt");