[FIR] Fix invalid diagnostic fir node sites and improved invalid type parameters count diagnostic report
This commit is contained in:
+4
-4
@@ -12,7 +12,7 @@ FILE: typeArgumentsNotAllowed.kt
|
||||
}
|
||||
public final fun <T> foo(): R|kotlin/Unit| {
|
||||
R|rest/bar|<<ERROR TYPE REF: Type arguments not allowed>>()
|
||||
R|rest/bar|<<ERROR TYPE REF: Type arguments not allowed>>()
|
||||
R|rest/bar|<R|kotlin/collections/List<kotlin/collections/List<ERROR CLASS: Type arguments not allowed>>|>()
|
||||
}
|
||||
public final fun <T> bar(): R|kotlin/Unit| {
|
||||
}
|
||||
@@ -41,9 +41,9 @@ FILE: typeArgumentsNotAllowed.kt
|
||||
public final fun <G> gest(): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun <T> fest(): R|kotlin/Unit| {
|
||||
lval b: <ERROR TYPE REF: Type arguments not allowed>
|
||||
lval b: R|kotlin/collections/List<ERROR CLASS: Type arguments not allowed>|
|
||||
R|rest/gest|<<ERROR TYPE REF: Type arguments not allowed>>()
|
||||
R|rest/gest|<R|T|>()
|
||||
lval c: <ERROR TYPE REF: Type arguments not allowed>
|
||||
R|rest/gest|<<ERROR TYPE REF: Type arguments not allowed>>()
|
||||
lval c: R|kotlin/collections/List<kotlin/collections/List<kotlin/collections/List<ERROR CLASS: Type arguments not allowed>>>|
|
||||
R|rest/gest|<R|kotlin/collections/List<kotlin/collections/List<ERROR CLASS: Type arguments not allowed>>|>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ FILE: upperBoundViolated.kt
|
||||
lval b2: R|B<C>| = R|/B.B|<R|C|>()
|
||||
lval b3: R|B<kotlin/Any?>| = R|/B.B|<R|kotlin/Any?|>()
|
||||
lval b4: R|B<A>| = R|/B.B|<<ERROR TYPE REF: Symbol not found, for `UnexistingType`>>()
|
||||
lval b5: R|B<A>| = R|/B.B|<<ERROR TYPE REF: Symbol not found, for `UnexistingType`>>()
|
||||
lval b5: R|B<B<ERROR CLASS: Symbol not found, for `UnexistingType`>>| = R|/B.B|<R|B<ERROR CLASS: Symbol not found, for `UnexistingType`>|>()
|
||||
R|/fest|<R|kotlin/Boolean|>()
|
||||
R|/fest|<R|C|>()
|
||||
R|/fest|<R|C|>()
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ fun test() {
|
||||
val b2 = B<C>()
|
||||
val b3 = B<<!UPPER_BOUND_VIOLATED!>Any?<!>>()
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()
|
||||
val b5 = B<<!UNRESOLVED_REFERENCE!>B<UnexistingType><!>>()
|
||||
val b5 = B<<!UPPER_BOUND_VIOLATED!>B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>><!>>()
|
||||
fest<<!UPPER_BOUND_VIOLATED!>Boolean<!>>()
|
||||
fest<C>()
|
||||
fest<HHH>()
|
||||
|
||||
@@ -18,11 +18,11 @@ FILE: typeParameterVsNested.kt
|
||||
|
||||
public abstract fun foo(arg: R|test/My.T<T>|): R|kotlin/Unit|
|
||||
|
||||
public abstract val y: <ERROR TYPE REF: Type argument not defined>
|
||||
public get(): <ERROR TYPE REF: Type argument not defined>
|
||||
public abstract val y: <ERROR TYPE REF: Wrong number of type arguments>
|
||||
public get(): <ERROR TYPE REF: Wrong number of type arguments>
|
||||
|
||||
public abstract val z: <ERROR TYPE REF: Type argument not defined>
|
||||
public get(): <ERROR TYPE REF: Type argument not defined>
|
||||
public abstract val z: <ERROR TYPE REF: Wrong number of type arguments>
|
||||
public get(): <ERROR TYPE REF: Wrong number of type arguments>
|
||||
|
||||
public final class Some : <ERROR TYPE REF: Type parameter cannot be a super-type: T> {
|
||||
public constructor(): R|test/My.Some| {
|
||||
|
||||
@@ -9,9 +9,9 @@ abstract class My<T : Some> {
|
||||
|
||||
abstract fun foo(arg: T)
|
||||
|
||||
abstract val y: My.T
|
||||
abstract val y: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>My.T<!>
|
||||
|
||||
abstract val z: test.My.T
|
||||
abstract val z: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>test.My.T<!>
|
||||
|
||||
class Some : <!UNRESOLVED_REFERENCE{LT}!><!OTHER_ERROR, UNRESOLVED_REFERENCE{PSI}!>T<!>()<!>
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -27,5 +27,5 @@ FILE: capturedParametersOfInnerClasses.kt
|
||||
}
|
||||
public final fun <R1, R2, R3> foo(c: R|A.B.C<R3, R3, R2, R2, R1, R1>|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun <R3> foo(c: <ERROR TYPE REF: Type argument not defined>): R|kotlin/Unit| {
|
||||
public final fun <R3> foo(c: <ERROR TYPE REF: Wrong number of type arguments>): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,4 +10,4 @@ class A<T1, T2> {
|
||||
|
||||
fun <R1, R2, R3> foo(c: A<R1, R1>.B<R2, R2>.C<R3, R3>) {}
|
||||
|
||||
fun <R3> foo(c: A.B.C<R3, R3>) {}
|
||||
fun <R3> foo(c: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>A.B.C<R3, R3><!>) {}
|
||||
|
||||
Reference in New Issue
Block a user