[NI] Add missing substitution of known type parameters
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.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// !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)
|
||||
}
|
||||
Reference in New Issue
Block a user