Like nested classes, it is not possible to reference inherited nested type alias by a child class.

This commit is contained in:
Dmitry Petrov
2016-06-10 14:13:14 +03:00
parent 7b6c1c092c
commit c414f456a4
4 changed files with 39 additions and 1 deletions
@@ -0,0 +1,13 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
open class Base {
typealias Nested = String
}
class Derived : Base()
fun test(x: Derived.<!UNRESOLVED_REFERENCE!>Nested<!>) = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!>
fun Base.testWithImplicitReceiver(x: <!UNRESOLVED_REFERENCE!>Nested<!>) {
val y: <!UNRESOLVED_REFERENCE!>Nested<!> = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!>
}
@@ -0,0 +1,19 @@
package
public fun test(/*0*/ x: [ERROR : Derived.Nested]): [ERROR : Derived.Nested]
public fun Base.testWithImplicitReceiver(/*0*/ x: [ERROR : Nested]): kotlin.Unit
public open class Base {
public typealias Nested = kotlin.String
public constructor Base()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public final class Derived : Base {
public constructor Derived()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}