Add test for smartcast

This commit is contained in:
Roman Golyshev
2020-06-24 18:39:09 +03:00
committed by Ilya Kirillov
parent ffb907150a
commit 81f60bf252
3 changed files with 31 additions and 0 deletions
@@ -0,0 +1,21 @@
interface A {
fun a()
}
interface B {
fun b()
}
interface C {
fun c()
}
fun take(a: A) {
if (a is B && a is C) {
a.<caret>
}
}
// EXIST: a
// EXIST: b
// EXIST: c
@@ -2277,6 +2277,11 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes
runTest("idea/idea-completion/testData/basic/common/primitiveCompletion/localVariablesAndFunctionsFromNestedScope.kt");
}
@TestMetadata("smartCast.kt")
public void testSmartCast() throws Exception {
runTest("idea/idea-completion/testData/basic/common/primitiveCompletion/smartCast.kt");
}
@TestMetadata("topLevelVariablesAndFunctions.kt")
public void testTopLevelVariablesAndFunctions() throws Exception {
runTest("idea/idea-completion/testData/basic/common/primitiveCompletion/topLevelVariablesAndFunctions.kt");
@@ -2277,6 +2277,11 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT
runTest("idea/idea-completion/testData/basic/common/primitiveCompletion/localVariablesAndFunctionsFromNestedScope.kt");
}
@TestMetadata("smartCast.kt")
public void testSmartCast() throws Exception {
runTest("idea/idea-completion/testData/basic/common/primitiveCompletion/smartCast.kt");
}
@TestMetadata("topLevelVariablesAndFunctions.kt")
public void testTopLevelVariablesAndFunctions() throws Exception {
runTest("idea/idea-completion/testData/basic/common/primitiveCompletion/topLevelVariablesAndFunctions.kt");