[FIR] Expand type alias when checking for type parameters from outer declaration

This fixes a false positive OUTER_CLASS_ARGUMENTS_REQUIRED when
referring to an inner class of a supertype that is extended using a
typealias.

#KT-62099 Fixed
This commit is contained in:
Kirill Rakhman
2023-10-24 11:01:17 +02:00
committed by Space Team
parent 907ebb36d0
commit 8821f8d1a4
8 changed files with 74 additions and 4 deletions
@@ -0,0 +1,33 @@
// FIR_IDENTICAL
// ISSUE: KT-62099
abstract class Foo<T> {
inner class Inner
abstract fun render(context: Inner)
}
typealias TA = Foo<String>
class Test : TA() {
override fun render(context: Inner) {}
}
typealias TA2<T> = Foo<T>
class Test2 : TA2<String>() {
override fun render(context: Inner) {}
}
typealias TA3<T> = Foo<T>
typealias TA3_2<T> = TA3<T>
class Test3 : TA3_2<String>() {
override fun render(context: Inner) {}
}
typealias TA4<T> = Foo<T>
typealias TA4_2 = TA4<String>
class Test4 : TA4_2() {
override fun render(context: Inner) {}
}