b6af13f18d
Known type parameters appear after inheriting from class with type parameters. Their substitution matters for inner class constructor, because without substitution it's parameters will be type checked against incorrect (original) parameter descriptor with unsubstituted type parameters. Skip creation of composite substitutor, if old substitutor is empty. New substitutors return null in case they don't substitute a type, but old type substitutors have explicit isEmpty method. Composite substitutor with empty old substitutor leads to creation of incorrect descriptor copies.
10 lines
196 B
Kotlin
Vendored
10 lines
196 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
|
|
abstract class TestType<V: Any> {
|
|
open inner class Inner(val item: V)
|
|
}
|
|
|
|
class Derived: TestType<Long>() {
|
|
inner class DerivedInner(item: Long): Inner(item)
|
|
}
|