From 2aba11abb88a24d0f6de2cbaf88528134d79a669 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Fri, 1 Apr 2016 17:15:08 +0300 Subject: [PATCH] Added test for generic operator --- .../testData/smart/propertyDelegate/GenericOperator.kt | 10 ++++++++++ .../test/JvmSmartCompletionTestGenerated.java | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 idea/idea-completion/testData/smart/propertyDelegate/GenericOperator.kt diff --git a/idea/idea-completion/testData/smart/propertyDelegate/GenericOperator.kt b/idea/idea-completion/testData/smart/propertyDelegate/GenericOperator.kt new file mode 100644 index 00000000000..ba66b5aadc5 --- /dev/null +++ b/idea/idea-completion/testData/smart/propertyDelegate/GenericOperator.kt @@ -0,0 +1,10 @@ +import kotlin.reflect.KProperty + +operator fun List.getValue(thisRef: T, property: KProperty<*>): Int = indexOf(thisRef) + +class C { + val property by +} + +// EXIST: lazy +// EXIST: listOf diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmSmartCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmSmartCompletionTestGenerated.java index 92a332d5317..9b261d0db4d 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmSmartCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmSmartCompletionTestGenerated.java @@ -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");