[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:
Nikolay Lunyak
2023-01-26 12:16:54 +02:00
parent 2b5d2dc539
commit 8f94899187
3 changed files with 3 additions and 6 deletions
@@ -146,7 +146,7 @@ object FirTypeParameterBoundsChecker : FirTypeParameterChecker() {
private fun checkDynamicBounds(declaration: FirTypeParameter, context: CheckerContext, reporter: DiagnosticReporter) {
declaration.bounds.forEach { bound ->
if (bound is FirDynamicTypeRef) {
if (bound.coneType is ConeDynamicType) {
reporter.reportOn(bound.source, FirErrors.DYNAMIC_UPPER_BOUND, context)
}
}
@@ -1,5 +0,0 @@
interface Tr : <!DYNAMIC_SUPERTYPE!>dynamic<!>
fun <T: dynamic> foo() {}
class C<T> where T : dynamic
@@ -1,3 +1,5 @@
// FIR_IDENTICAL
interface Tr : <!DYNAMIC_SUPERTYPE!>dynamic<!>
fun <T: <!DYNAMIC_UPPER_BOUND!>dynamic<!>> foo() {}