Simplify diagnostic when there are wrong number of type arguments
#KT-12767 Fixed
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
interface ApplicationFeature<in P : Pipeline<*>, B : Any, V>
|
||||
open class Pipeline<TSubject : Any>()
|
||||
fun <A : Pipeline<*>, T : Any, V> A.feature(<warning>feature</warning>: ApplicationFeature<error descr="[WRONG_NUMBER_OF_TYPE_ARGUMENTS] 3 type arguments expected for interface ApplicationFeature<in P : Pipeline<*>, B : Any, V> defined in root package in file incompleteTypeArgumentList.kt"><A, T></error>) : Unit {}
|
||||
fun <A : Pipeline<*>, T : Any, V> A.feature(<warning>feature</warning>: ApplicationFeature<error descr="[WRONG_NUMBER_OF_TYPE_ARGUMENTS] 3 type arguments expected for interface ApplicationFeature<in P : Pipeline<*>, B : Any, V>"><A, T></error>) : Unit {}
|
||||
@@ -0,0 +1,7 @@
|
||||
package name.that.may.be.very.long
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
interface Foo<T> : Comparable<Foo<T>>, Serializable, Cloneable
|
||||
|
||||
fun test(<warning>f</warning>: <error descr="[WRONG_NUMBER_OF_TYPE_ARGUMENTS] One type argument expected for interface Foo<T>">Foo</error>) {}
|
||||
+1
-1
@@ -2,4 +2,4 @@ open class A<T>()
|
||||
class G<T>()
|
||||
|
||||
|
||||
class B : A<<error descr="[WRONG_NUMBER_OF_TYPE_ARGUMENTS] One type argument expected for class G<T> defined in root package in file kt9887.kt">G</error>>()
|
||||
class B : A<<error descr="[WRONG_NUMBER_OF_TYPE_ARGUMENTS] One type argument expected for class G<T>">G</error>>()
|
||||
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddStarProjectionsFix" "false"
|
||||
// ERROR: 2 type arguments expected for interface Map<K, out V> defined in kotlin.collections
|
||||
// ERROR: 2 type arguments expected for interface Map<K, out V>
|
||||
public fun foo(a: Any) {
|
||||
a is <caret>Map<Int>
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddStarProjectionsFix" "false"
|
||||
// ERROR: 2 type arguments expected for interface Map<K, out V> defined in kotlin.collections
|
||||
// ERROR: 2 type arguments expected for interface Map<K, out V>
|
||||
public fun foo(a: Any) {
|
||||
when (a) {
|
||||
is <caret>Map<Int> -> {}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create secondary constructor" "false"
|
||||
// ACTION: Add parameter to constructor 'A'
|
||||
// ACTION: Create function 'A'
|
||||
// ERROR: No type arguments expected for constructor A() defined in A
|
||||
// ERROR: No type arguments expected for constructor A()
|
||||
// ERROR: Too many arguments for public constructor A() defined in A
|
||||
|
||||
class A
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create type parameter in class 'X'" "false"
|
||||
// ERROR: 2 type arguments expected for class X<T, U> defined in root package in file missingArguments.kt
|
||||
// ERROR: 2 type arguments expected for class X<T, U>
|
||||
class X<T, U>
|
||||
fun Y(x: X<<caret>String>) {}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create type parameter in class 'X'" "false"
|
||||
// ERROR: No type arguments expected for class X defined in root package in file notOnTypeArgumentList.kt
|
||||
// ERROR: No type arguments expected for class X
|
||||
|
||||
class X
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Make 'IterablePipeline' abstract" "true"
|
||||
// ERROR: 'pipe' overrides nothing
|
||||
// ERROR: One type argument expected for interface Pipeline<TPipeline> defined in root package in file kt10409.kt
|
||||
// ERROR: One type argument expected for interface Pipeline<TPipeline>
|
||||
|
||||
// Actually this test is about getting rid of assertion happenning while creating quick fixes
|
||||
// See KT-10409
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Make 'IterablePipeline' abstract" "true"
|
||||
// ERROR: 'pipe' overrides nothing
|
||||
// ERROR: One type argument expected for interface Pipeline<TPipeline> defined in root package in file kt10409.kt
|
||||
// ERROR: One type argument expected for interface Pipeline<TPipeline>
|
||||
|
||||
// Actually this test is about getting rid of assertion happenning while creating quick fixes
|
||||
// See KT-10409
|
||||
|
||||
Reference in New Issue
Block a user