KT-14352 Record short reference to companion object via type alias,

so that it would be checked properly.
This commit is contained in:
Dmitry Petrov
2016-10-14 11:55:42 +03:00
parent ac675784c1
commit 753a558bcb
8 changed files with 88 additions and 24 deletions
@@ -0,0 +1,15 @@
// !API_VERSION: 1.0
class C {
@SinceKotlin("1.1")
companion object {
val x = 42
}
}
typealias CA = C
val test1 = <!NO_COMPANION_OBJECT!>CA<!>
val test2 = CA.<!UNRESOLVED_REFERENCE!>Companion<!>
val test3 = <!API_NOT_AVAILABLE!>CA<!>.x
val test4 = CA.<!UNRESOLVED_REFERENCE!>Companion<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!>
@@ -0,0 +1,22 @@
package
public val test1: [ERROR : Type for CA]
public val test2: [ERROR : Type for CA.Companion]
public val test3: kotlin.Int = 42
public val test4: [ERROR : <ERROR PROPERTY TYPE>]
public final class C {
public constructor C()
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
@kotlin.SinceKotlin(version = "1.1") public companion object Companion {
private constructor Companion()
public final val x: kotlin.Int = 42
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 typealias CA = C