Added test for generic operator

This commit is contained in:
Valentin Kipyatkov
2016-04-01 17:15:08 +03:00
parent 3aff4d4c17
commit 2aba11abb8
2 changed files with 16 additions and 0 deletions
@@ -0,0 +1,10 @@
import kotlin.reflect.KProperty
operator fun <T> List<T>.getValue(thisRef: T, property: KProperty<*>): Int = indexOf(thisRef)
class C {
val property by <caret>
}
// EXIST: lazy
// EXIST: listOf
@@ -1528,6 +1528,12 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT
doTest(fileName);
}
@TestMetadata("GenericOperator.kt")
public void testGenericOperator() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/GenericOperator.kt");
doTest(fileName);
}
@TestMetadata("GenericVal.kt")
public void testGenericVal() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/GenericVal.kt");