Fallback to Any type in case supertypes are empty

This can happen e.g. if all supertypes were on the cycle (A : B, B : A)
-- then SupertypesLoopChecker will cut all supertypes that are on cycle,
leaving set of supertypes empty.

Some clients in the compiler are not ready to work with empty list of
supertypes -- notably, CommonSupertypes.

^KT-23029 Fixed
This commit is contained in:
Dmitry Savvinov
2018-03-12 13:02:11 +03:00
parent eb3b9032d6
commit 2d8e4e752c
22 changed files with 219 additions and 0 deletions
@@ -2,6 +2,9 @@ package
public open class A {
public constructor A()
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 open class AA {
public constructor AA()
@@ -13,6 +16,9 @@ public open class A {
public open class B {
public constructor B()
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 open class BB {
public constructor BB()