[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:
Victor Petukhov
2021-11-30 18:07:48 +03:00
parent 61d40403e7
commit ce2c6f5d1f
10 changed files with 80 additions and 1 deletions
+27
View File
@@ -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"
}