[AA LC] Approximate anonymous type to single supertype if possible

^KT-55780 Fixed
^KT-55778 Fixed
This commit is contained in:
Dmitriy Novozhilov
2022-09-20 18:17:45 +03:00
committed by Space Team
parent 935b4f2feb
commit 3a536bb32f
8 changed files with 137 additions and 15 deletions
@@ -0,0 +1,38 @@
final class null /* null*/ {
private ();// .ctor()
}
final class null /* null*/ extends A {
private ();// .ctor()
}
final class null /* null*/ implements B {
private ();// .ctor()
}
final class null /* null*/ extends A implements B {
private ();// .ctor()
}
public abstract class A /* A*/ {
public A();// .ctor()
}
public abstract interface B /* B*/ {
}
public final class C /* C*/ {
@org.jetbrains.annotations.NotNull()
private final A x2;
@org.jetbrains.annotations.NotNull()
private final B x3;
@org.jetbrains.annotations.NotNull()
private final java.lang.Object x1;
@org.jetbrains.annotations.NotNull()
private final java.lang.Object x4;
public C();// .ctor()
}
@@ -0,0 +1,38 @@
final class null /* null*/ {
private ();// .ctor()
}
final class null /* null*/ extends A {
private ();// .ctor()
}
final class null /* null*/ implements B {
private ();// .ctor()
}
final class null /* null*/ extends A implements B {
private ();// .ctor()
}
public abstract class A /* A*/ {
public A();// .ctor()
}
public abstract interface B /* B*/ {
}
public final class C /* C*/ {
@org.jetbrains.annotations.NotNull()
private final A x2;
@org.jetbrains.annotations.NotNull()
private final A x4;
@org.jetbrains.annotations.NotNull()
private final B x3;
@org.jetbrains.annotations.NotNull()
private final java.lang.Object x1;
public C();// .ctor()
}
@@ -0,0 +1,9 @@
abstract class A
interface B
class C {
private val x1 = object {}
private val x2 = object : A() {}
private val x3 = object : B {}
private val x4 = object : A(), B {}
}
@@ -0,0 +1,22 @@
public abstract class A /* A*/ {
public A();// .ctor()
}
public abstract interface B /* B*/ {
}
public final class C /* C*/ {
@org.jetbrains.annotations.NotNull()
private final C.x1.1 x1;
@org.jetbrains.annotations.NotNull()
private final C.x2.1 x2;
@org.jetbrains.annotations.NotNull()
private final C.x3.1 x3;
@org.jetbrains.annotations.NotNull()
private final C.x4.1 x4;
public C();// .ctor()
}