KT-8176 References to type arguments are not resolved when number of them does not match type parameters

KT-8078 FQ-name inserted on class name completion in type arguments

 #KT-8176 Fixed
 #KT-8078 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-08-07 21:01:57 +03:00
parent de78ab6fe6
commit f658cce1f1
8 changed files with 47 additions and 5 deletions
@@ -0,0 +1,5 @@
class Foo<T, V>
class Bar: Foo<S<caret>
// ELEMENT: StringBuilder
@@ -0,0 +1,5 @@
class Foo<T, V>
class Bar: Foo<StringBuilder<caret>
// ELEMENT: StringBuilder
@@ -53,6 +53,12 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion
doTest(fileName);
}
@TestMetadata("FirstTypeArgument.kt")
public void testFirstTypeArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/FirstTypeArgument.kt");
doTest(fileName);
}
@TestMetadata("GenericFunctionWithTab.kt")
public void testGenericFunctionWithTab() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt");
@@ -1,2 +1 @@
kotlin.Int
kotlin.properties.ObservableProperty
kotlin.properties.ObservableProperty
@@ -0,0 +1,3 @@
val v: UnknownClass<<caret>String>
// REF: (kotlin).String
@@ -0,0 +1,5 @@
class Foo<T, V>
class Bar: Foo<<caret>String
// REF: (kotlin).String
@@ -353,6 +353,18 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest
doTest(fileName);
}
@TestMetadata("TypeArgumentUnresolvedClass.kt")
public void testTypeArgumentUnresolvedClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/references/TypeArgumentUnresolvedClass.kt");
doTest(fileName);
}
@TestMetadata("TypeArgumentWrongNumber.kt")
public void testTypeArgumentWrongNumber() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/references/TypeArgumentWrongNumber.kt");
doTest(fileName);
}
@TestMetadata("TypeParameterInAnonymousObject.kt")
public void testTypeParameterInAnonymousObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/references/TypeParameterInAnonymousObject.kt");