[FIR] Only inherit class type parameters if inner class
Nested classes which are not inner class should not be able to access type parameters of the outer class. Make sure access is not available when resolving super types. #KT-54748 Fixed
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ private fun <E> foobar() = {
|
||||
fun a() = A<E, X, Y, Z>()
|
||||
}
|
||||
|
||||
typealias LocalAlias<W> = A<E, <!UNRESOLVED_REFERENCE!>X<!>, <!UNRESOLVED_REFERENCE!>Y<!>, W>
|
||||
typealias LocalAlias<W> = A<E, X, Y, W>
|
||||
}
|
||||
|
||||
class Derived : LocalOuter<Double, Short>() {
|
||||
@@ -26,7 +26,7 @@ private fun noParameters() = {
|
||||
fun a() = A<Any, X, Y, Z>()
|
||||
}
|
||||
|
||||
typealias LocalAlias2<W> = A<Any, <!UNRESOLVED_REFERENCE!>X<!>, <!UNRESOLVED_REFERENCE!>Y<!>, W>
|
||||
typealias LocalAlias2<W> = A<Any, X, Y, W>
|
||||
}
|
||||
|
||||
class Derived2 : LocalOuter2<Double, Short>() {
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ class Outer<T> {
|
||||
fun a() = A<T, F, E, X, Y, Z>()
|
||||
}
|
||||
|
||||
typealias LocalAlias<W> = A<T, F, E, <!UNRESOLVED_REFERENCE!>X<!>, <!UNRESOLVED_REFERENCE!>Y<!>, W>
|
||||
typealias LocalAlias<W> = A<T, F, E, X, Y, W>
|
||||
}
|
||||
|
||||
class Derived : LocalOuter<Double, Short>() {
|
||||
@@ -28,7 +28,7 @@ class Outer<T> {
|
||||
fun a() = A<T, F, Any, X, Y, Z>()
|
||||
}
|
||||
|
||||
typealias LocalAlias2<W> = A<T, F, Any, <!UNRESOLVED_REFERENCE!>X<!>, <!UNRESOLVED_REFERENCE!>Y<!>, W>
|
||||
typealias LocalAlias2<W> = A<T, F, Any, X, Y, W>
|
||||
}
|
||||
|
||||
class Derived2 : LocalOuter2<Double, Short>() {
|
||||
|
||||
Reference in New Issue
Block a user