deea0643ad
In case of type constructors captured parameters from outer classes #KT-5510 Fixed #KT-3112 Fixed #KT-6325 Fixed #KT-408 Fixed #KT-6337 Fixed
19 lines
354 B
Kotlin
Vendored
19 lines
354 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER
|
|
|
|
class Outer<E> {
|
|
inner class Inner<E> {
|
|
fun foo(): E = null!!
|
|
fun outerE() = baz()
|
|
}
|
|
|
|
fun baz(): E = null!!
|
|
}
|
|
|
|
fun main() {
|
|
val inner = Outer<String>().Inner<Int>()
|
|
|
|
inner.foo().checkType { _<Int>() }
|
|
inner.outerE().checkType { _<String>() }
|
|
}
|