Skip to content

Commit

Permalink
[FIR][checkers][JS] Expand type aliases to supertypes in FirJsInherit…
Browse files Browse the repository at this point in the history
…anceClassChecker

#KT-66673 Fixed

(cherry picked from commit 29efe86)
  • Loading branch information
FenstonSingel committed Mar 19, 2024
1 parent 94a27a3 commit 138c149
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Expand Up @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.unsubstitutedScope
import org.jetbrains.kotlin.fir.analysis.diagnostics.js.FirJsErrors
import org.jetbrains.kotlin.fir.analysis.js.checkers.isOverridingExternalWithOptionalParams
import org.jetbrains.kotlin.fir.declarations.FirClass
import org.jetbrains.kotlin.fir.declarations.fullyExpandedClass
import org.jetbrains.kotlin.fir.declarations.utils.isEffectivelyExternal
import org.jetbrains.kotlin.fir.declarations.utils.isExpect
import org.jetbrains.kotlin.fir.declarations.utils.superConeTypes
Expand Down Expand Up @@ -48,7 +49,7 @@ sealed class FirJsInheritanceClassChecker(mppKind: MppCheckerKind) : FirClassChe
if (isEffectivelyExternal && declaration.classKind != ClassKind.ANNOTATION_CLASS) {
val superTypes = declaration.superConeTypes
.filterNot { it.isAnyOrNullableAny || it.isThrowableOrNullableThrowable || it.isEnum }
.mapNotNull { it.toSymbol(session) }
.mapNotNull { it.toSymbol(session)?.fullyExpandedClass(session) }

if (superTypes.any { !it.isEffectivelyExternal(session) }) {
reporter.reportOn(declaration.source, FirJsErrors.EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE, context)
Expand Down

This file was deleted.

@@ -1,3 +1,5 @@
// FIR_IDENTICAL

external interface Base

typealias TypeAlias = Base
Expand Down

0 comments on commit 138c149

Please sign in to comment.