Checking for conflicting substitutors in completion after "by"

This commit is contained in:
Valentin Kipyatkov
2016-03-31 22:21:29 +03:00
parent e05d6a7056
commit 24764ed865
6 changed files with 55 additions and 8 deletions
@@ -0,0 +1,11 @@
import kotlin.reflect.KProperty
class X<T> {
operator fun getValue(thisRef: T, property: KProperty<*>): T = throw Exception()
}
class C<T> {
val property: Int by <caret>
}
// ABSENT: X
@@ -0,0 +1,11 @@
import kotlin.reflect.KProperty
class X<T>(t: T) {
operator fun getValue(thisRef: T, property: KProperty<*>): T = throw Exception()
}
class C<T> {
val property: C<T> by <caret>
}
// EXIST: { itemText: "X", tailText: "(t: C<T>) (<root>)" }
@@ -1450,6 +1450,12 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/propertyDelegate"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("ConflictingSubstitutors.kt")
public void testConflictingSubstitutors() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ConflictingSubstitutors.kt");
doTest(fileName);
}
@TestMetadata("DelegatesDot.kt")
public void testDelegatesDot() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/DelegatesDot.kt");
@@ -1522,6 +1528,12 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT
doTest(fileName);
}
@TestMetadata("NonConflictingSubstitutors.kt")
public void testNonConflictingSubstitutors() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/NonConflictingSubstitutors.kt");
doTest(fileName);
}
@TestMetadata("Order.kt")
public void testOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/Order.kt");