[FIR JS] Fix a typo in the dynamic upper bound check
`FirDynamicTypeRef` is the unresolved version, and after resolution it becomes `FirResolvedTypeRef` with `ConeDynamicType`.
This commit is contained in:
+1
-1
@@ -146,7 +146,7 @@ object FirTypeParameterBoundsChecker : FirTypeParameterChecker() {
|
|||||||
|
|
||||||
private fun checkDynamicBounds(declaration: FirTypeParameter, context: CheckerContext, reporter: DiagnosticReporter) {
|
private fun checkDynamicBounds(declaration: FirTypeParameter, context: CheckerContext, reporter: DiagnosticReporter) {
|
||||||
declaration.bounds.forEach { bound ->
|
declaration.bounds.forEach { bound ->
|
||||||
if (bound is FirDynamicTypeRef) {
|
if (bound.coneType is ConeDynamicType) {
|
||||||
reporter.reportOn(bound.source, FirErrors.DYNAMIC_UPPER_BOUND, context)
|
reporter.reportOn(bound.source, FirErrors.DYNAMIC_UPPER_BOUND, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
interface Tr : <!DYNAMIC_SUPERTYPE!>dynamic<!>
|
|
||||||
|
|
||||||
fun <T: dynamic> foo() {}
|
|
||||||
|
|
||||||
class C<T> where T : dynamic
|
|
||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
|
||||||
interface Tr : <!DYNAMIC_SUPERTYPE!>dynamic<!>
|
interface Tr : <!DYNAMIC_SUPERTYPE!>dynamic<!>
|
||||||
|
|
||||||
fun <T: <!DYNAMIC_UPPER_BOUND!>dynamic<!>> foo() {}
|
fun <T: <!DYNAMIC_UPPER_BOUND!>dynamic<!>> foo() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user