Add test for smartcast
This commit is contained in:
committed by
Ilya Kirillov
parent
ffb907150a
commit
81f60bf252
@@ -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
|
||||
+5
@@ -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");
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user