[FIR] Fix invalid diagnostic fir node sites and improved invalid type parameters count diagnostic report

This commit is contained in:
Igor Yakovlev
2021-01-18 22:39:41 +03:00
parent b7d3469819
commit 2e4daee1d4
50 changed files with 118 additions and 125 deletions
@@ -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>>|>()
}
@@ -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|>()
@@ -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>()