[FIR] Match type in super<type> access with actual supertypes of class

This commit is contained in:
Dmitriy Novozhilov
2020-07-15 12:17:44 +03:00
parent 1ce4eca3a6
commit cedd1c133e
9 changed files with 63 additions and 40 deletions
@@ -14,6 +14,6 @@ class Derived : BaseDerived2<Int>() {
}
fun foo() {
Derived().foo() checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Outer<Int, String>.Inner<Char>>() }
Derived().foo() checkType { _<Outer<Int, String>.Inner<Char>>() }
Derived().baz() <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Map<Char, Int>>() }
}
@@ -1,18 +0,0 @@
// !CHECK_TYPE
open class Outer<E> {
inner open class Inner<F> {
inner class Inner2<D> {
}
}
}
class DerivedOuter : Outer<String>() {
inner class DerivedInner : Inner<Int>() {
fun foo(): Inner2<Char> = null!!
}
}
fun foo() {
DerivedOuter().DerivedInner().foo() checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Outer<String>.Inner<Int>.Inner2<Char>>() }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
open class Outer<E> {
inner open class Inner<F> {