Files
kotlin-fork/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnCaptured.kt
T
Kirill Rakhman 251827c9aa [FIR] Don't approximate captured types
This fixes some type argument mismatch errors caused by a captured type
being approximated and then captured again.
Some places need to be adapted to work with captured types that
previously only worked with approximated types.

#KT-62959 Fixed
2024-01-17 08:20:05 +00:00

18 lines
500 B
Kotlin
Vendored

// FIR_IDENTICAL
abstract class FirBasedSymbol<E : FirDeclaration> {
val fir: E get() = null!!
}
abstract class FirCallableSymbol<D : FirCallableDeclaration> : FirBasedSymbol<D>()
sealed class FirDeclaration
sealed class FirCallableDeclaration : FirDeclaration()
class FirFunction : FirCallableDeclaration()
class FirVariable : FirCallableDeclaration()
val FirCallableSymbol<*>.isExtension: Boolean
get() = when (fir) {
is FirFunction -> true
is FirVariable -> false
}