[FE 1.0] Don't mark type variable as READY_FOR_FIXATION_DECLARED_UPPER_BOUND_WITH_SELF_TYPES if it has complex dependency to other type variables
^KT-49838 Fixed
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
inline fun <
|
||||
reified TService : Service<TService, TEvent>,
|
||||
reified TEvent : Event<TService>> event(
|
||||
noinline handler: suspend (TEvent) -> Unit
|
||||
) {
|
||||
val serviceKlass = TService::class
|
||||
val eventKlass = TEvent::class
|
||||
}
|
||||
|
||||
interface Service<
|
||||
Self : Service<Self, TEvent>,
|
||||
in TEvent : Event<Self>
|
||||
>
|
||||
|
||||
interface Event<out T : Service<out T, *>>
|
||||
|
||||
class SomeService : Service<SomeService, SomeService.SomeEvent> {
|
||||
class SomeEvent : Event<SomeService>
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
event { someEvent: SomeService.SomeEvent -> } // REIFIED_TYPE_FORBIDDEN_SUBSTITUTION
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user