[FIR] Fix collecting member candidates on receiver with smartcast
^KT-51460 Fixed ^KT-51827
This commit is contained in:
committed by
teamcity
parent
51bd0fd2db
commit
6e2402620f
Vendored
+84
@@ -0,0 +1,84 @@
|
||||
// FIR_IDENTICAL
|
||||
interface Base {
|
||||
fun baseFun()
|
||||
}
|
||||
|
||||
interface Derived : Base {
|
||||
fun derivedFun()
|
||||
}
|
||||
|
||||
abstract class A<T : Base> {
|
||||
protected val a: T = null!!
|
||||
|
||||
fun fest_1(other: A<*>) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
}
|
||||
|
||||
open class B : A<Derived>() {
|
||||
class Nested {
|
||||
fun fest_3(other: A<*>) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C : B() {
|
||||
fun fest_4(other: A<*>) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class D : A<Derived>() {
|
||||
fun fest_5(other: A<*>) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
package
|
||||
|
||||
public abstract class A</*0*/ T : Base> {
|
||||
public constructor A</*0*/ T : Base>()
|
||||
protected final val a: T
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fest_1(/*0*/ other: A<*>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class B : A<Derived> {
|
||||
public constructor B()
|
||||
protected final override /*1*/ /*fake_override*/ val a: Derived
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A<*>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested {
|
||||
public constructor Nested()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fest_3(/*0*/ other: A<*>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class C : A.B {
|
||||
public constructor C()
|
||||
protected final override /*1*/ /*fake_override*/ val a: Derived
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A<*>): kotlin.Unit
|
||||
public final fun fest_4(/*0*/ other: A<*>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class D : A<Derived> {
|
||||
public constructor D()
|
||||
protected final override /*1*/ /*fake_override*/ val a: Derived
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A<*>): kotlin.Unit
|
||||
public final fun fest_5(/*0*/ other: A<*>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public interface Base {
|
||||
public abstract fun baseFun(): kotlin.Unit
|
||||
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 interface Derived : Base {
|
||||
public abstract override /*1*/ /*fake_override*/ fun baseFun(): kotlin.Unit
|
||||
public abstract fun derivedFun(): kotlin.Unit
|
||||
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
|
||||
}
|
||||
|
||||
Vendored
+68
@@ -0,0 +1,68 @@
|
||||
// FIR_IDENTICAL
|
||||
interface Base {
|
||||
fun baseFun()
|
||||
}
|
||||
|
||||
abstract class A {
|
||||
protected val a: Base = null!!
|
||||
|
||||
fun fest_1(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
}
|
||||
|
||||
open class B : A() {
|
||||
class Nested {
|
||||
fun fest_3(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C : B() {
|
||||
fun fest_4(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class D : A() {
|
||||
fun fest_5(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+55
@@ -0,0 +1,55 @@
|
||||
package
|
||||
|
||||
public abstract class A {
|
||||
public constructor A()
|
||||
protected final val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class B : A {
|
||||
public constructor B()
|
||||
protected final override /*1*/ /*fake_override*/ val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested {
|
||||
public constructor Nested()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fest_3(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class C : A.B {
|
||||
public constructor C()
|
||||
protected final override /*1*/ /*fake_override*/ val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public final fun fest_4(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class D : A {
|
||||
public constructor D()
|
||||
protected final override /*1*/ /*fake_override*/ val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public final fun fest_5(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public interface Base {
|
||||
public abstract fun baseFun(): kotlin.Unit
|
||||
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
|
||||
}
|
||||
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
// FIR_DUMP
|
||||
|
||||
interface Base {
|
||||
fun baseFun()
|
||||
}
|
||||
|
||||
interface Derived : Base {
|
||||
fun derivedFun()
|
||||
}
|
||||
|
||||
abstract class A {
|
||||
abstract protected val a: Base
|
||||
|
||||
fun fest_1(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
}
|
||||
|
||||
open class B(override val a: Derived) : A() {
|
||||
class Nested {
|
||||
fun fest_3(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C(override val a: Derived) : B(a) {
|
||||
fun fest_4(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class D(override val a: Derived) : A() {
|
||||
fun fest_5(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
other.a.<!UNRESOLVED_REFERENCE!>derivedFun<!>()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
other.a.derivedFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
FILE: protectedVisibilityAndSmartcast_overrideChangesType.fir.kt
|
||||
public abstract interface Base : R|kotlin/Any| {
|
||||
public abstract fun baseFun(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Derived : R|Base| {
|
||||
public abstract fun derivedFun(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
protected abstract val a: R|Base|
|
||||
protected get(): R|Base|
|
||||
|
||||
public final fun fest_1(other: R|A|): R|kotlin/Unit| {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
when () {
|
||||
(R|<local>/other| is R|A.B|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
(R|<local>/other| is R|A.C|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
(R|<local>/other| is R|A.D|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public open class B : R|A| {
|
||||
public constructor(a: R|Derived|): R|A.B| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
protected open override val a: R|Derived| = R|<local>/a|
|
||||
protected get(): R|Derived|
|
||||
|
||||
public final class Nested : R|kotlin/Any| {
|
||||
public constructor(): R|A.B.Nested| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun fest_3(other: R|A|): R|kotlin/Unit| {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
when () {
|
||||
(R|<local>/other| is R|A.B|) -> {
|
||||
R|<local>/other|.R|/A.B.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.B.a|.R|/Derived.derivedFun|()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
(R|<local>/other| is R|A.C|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
(R|<local>/other| is R|A.D|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final class C : R|A.B| {
|
||||
public constructor(a: R|Derived|): R|A.C| {
|
||||
super<R|A.B|>(R|<local>/a|)
|
||||
}
|
||||
|
||||
protected final override val a: R|Derived| = R|<local>/a|
|
||||
protected get(): R|Derived|
|
||||
|
||||
public final fun fest_4(other: R|A|): R|kotlin/Unit| {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
when () {
|
||||
(R|<local>/other| is R|A.B|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
(R|<local>/other| is R|A.C|) -> {
|
||||
R|<local>/other|.R|/A.C.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.C.a|.R|/Derived.derivedFun|()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
(R|<local>/other| is R|A.D|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final class D : R|A| {
|
||||
public constructor(a: R|Derived|): R|A.D| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
protected final override val a: R|Derived| = R|<local>/a|
|
||||
protected get(): R|Derived|
|
||||
|
||||
public final fun fest_5(other: R|A|): R|kotlin/Unit| {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
when () {
|
||||
(R|<local>/other| is R|A.B|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
(R|<local>/other| is R|A.C|) -> {
|
||||
R|<local>/other|.R|/A.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.a|.<Unresolved name: derivedFun>#()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
(R|<local>/other| is R|A.D|) -> {
|
||||
R|<local>/other|.R|/A.D.a|.R|/Base.baseFun|()
|
||||
R|<local>/other|.R|/A.D.a|.R|/Derived.derivedFun|()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
// FIR_DUMP
|
||||
|
||||
interface Base {
|
||||
fun baseFun()
|
||||
}
|
||||
|
||||
interface Derived : Base {
|
||||
fun derivedFun()
|
||||
}
|
||||
|
||||
abstract class A {
|
||||
abstract protected val a: Base
|
||||
|
||||
fun fest_1(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
}
|
||||
|
||||
open class B(override val a: Derived) : A() {
|
||||
class Nested {
|
||||
fun fest_3(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.a.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.a.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C(override val a: Derived) : B(a) {
|
||||
fun fest_4(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.a.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.a.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class D(override val a: Derived) : A() {
|
||||
fun fest_5(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
if (other is C) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>.derivedFun()
|
||||
}
|
||||
if (other is D) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.a.baseFun()
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.a.derivedFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package
|
||||
|
||||
public abstract class A {
|
||||
public constructor A()
|
||||
protected abstract val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class B : A {
|
||||
public constructor B(/*0*/ a: Derived)
|
||||
protected open override /*1*/ val a: Derived
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested {
|
||||
public constructor Nested()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fest_3(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class C : A.B {
|
||||
public constructor C(/*0*/ a: Derived)
|
||||
protected open override /*1*/ val a: Derived
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public final fun fest_4(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class D : A {
|
||||
public constructor D(/*0*/ a: Derived)
|
||||
protected open override /*1*/ val a: Derived
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public final fun fest_5(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public interface Base {
|
||||
public abstract fun baseFun(): kotlin.Unit
|
||||
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 interface Derived : Base {
|
||||
public abstract override /*1*/ /*fake_override*/ fun baseFun(): kotlin.Unit
|
||||
public abstract fun derivedFun(): kotlin.Unit
|
||||
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
|
||||
}
|
||||
|
||||
Vendored
+68
@@ -0,0 +1,68 @@
|
||||
// FIR_IDENTICAL
|
||||
interface Base {
|
||||
fun baseFun()
|
||||
}
|
||||
|
||||
abstract class A {
|
||||
abstract protected val a: Base
|
||||
|
||||
fun fest_1(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
}
|
||||
|
||||
open class B(override val a: Base) : A() {
|
||||
class Nested {
|
||||
fun fest_3(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C(override val a: Base) : B(a) {
|
||||
fun fest_4(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class D(override val a: Base) : A() {
|
||||
fun fest_5(other: A) {
|
||||
other.a.baseFun() // OK
|
||||
if (other is B) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is C) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
if (other is D) {
|
||||
other.a.baseFun()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+55
@@ -0,0 +1,55 @@
|
||||
package
|
||||
|
||||
public abstract class A {
|
||||
public constructor A()
|
||||
protected abstract val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class B : A {
|
||||
public constructor B(/*0*/ a: Base)
|
||||
protected open override /*1*/ val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested {
|
||||
public constructor Nested()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fest_3(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class C : A.B {
|
||||
public constructor C(/*0*/ a: Base)
|
||||
protected open override /*1*/ val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public final fun fest_4(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class D : A {
|
||||
public constructor D(/*0*/ a: Base)
|
||||
protected open override /*1*/ val a: Base
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun fest_1(/*0*/ other: A): kotlin.Unit
|
||||
public final fun fest_5(/*0*/ other: A): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public interface Base {
|
||||
public abstract fun baseFun(): kotlin.Unit
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user