Use type arguments from supertype when resolving constructor delegation call

#KT-3357 Fixed
This commit is contained in:
Denis Zharkov
2016-01-25 18:09:51 +03:00
parent 8b828f1d9a
commit 8ec63bd4dd
11 changed files with 236 additions and 27 deletions
@@ -0,0 +1,18 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
open class Super<T> {
inner open class Inner {
open fun getOuter(): Super<T> = throw UnsupportedOperationException()
}
}
class Sub<T1>(): Super<T1>() {
inner class SubInner : Super<T1>.Inner() { // 'Inner' is unresolved
// Also, T1 is not resolved to anything, and not marked as resolved
init {
val x: Super<T1>.Inner = this // T1 is not resolved to anything
}
override fun getOuter(): Sub<T1> = throw UnsupportedOperationException()
}
}