FIR: report SUPERTYPE_NOT_A_CLASS_OR_INTERFACE on type parameters

This commit is contained in:
Mikhail Glukhikh
2021-02-16 15:28:15 +03:00
parent e67eb0c123
commit 3e9ff3ecda
10 changed files with 25 additions and 13 deletions
@@ -24,7 +24,7 @@ FILE: typeParameterVsNested.kt
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 final class Some : <ERROR TYPE REF: Type parameter T cannot be a supertype> {
public constructor(): R|test/My.Some| {
super<R|test/My.T<T>|>()
}
@@ -32,7 +32,7 @@ FILE: typeParameterVsNested.kt
}
}
public abstract class Your<T : R|test/Some|> : <ERROR TYPE REF: Type parameter cannot be a super-type: T> {
public abstract class Your<T : R|test/Some|> : <ERROR TYPE REF: Type parameter T cannot be a supertype> {
public constructor<T : R|test/Some|>(): R|test/Your<T>| {
super<R|kotlin/Any|>()
}
@@ -13,7 +13,7 @@ abstract class My<T : Some> {
abstract val z: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>test.My.T<!>
class Some : <!UNRESOLVED_REFERENCE{LT}!><!OTHER_ERROR, UNRESOLVED_REFERENCE{PSI}!>T<!>()<!>
class Some : <!UNRESOLVED_REFERENCE{LT}!><!SUPERTYPE_NOT_A_CLASS_OR_INTERFACE, UNRESOLVED_REFERENCE{PSI}!>T<!>()<!>
}
abstract class Your<T : Some> : <!OTHER_ERROR!>T<!>
abstract class Your<T : Some> : <!SUPERTYPE_NOT_A_CLASS_OR_INTERFACE!>T<!>