[FIR] Allow smartcasts on member properties for classes from dependsOn dependencies
This commit is contained in:
committed by
teamcity
parent
aeb68f956c
commit
851305f981
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// MODULE: common
|
||||
class Some {
|
||||
val e: SomeEnum? = null
|
||||
}
|
||||
|
||||
enum class SomeEnum {
|
||||
A, B
|
||||
}
|
||||
|
||||
// MODULE: main()()(common)
|
||||
fun Some.test() {
|
||||
if (e == null) return
|
||||
val x = when (e) {
|
||||
SomeEnum.A -> "a"
|
||||
SomeEnum.B -> "B"
|
||||
}
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// MODULE: common
|
||||
class Some {
|
||||
val e: SomeEnum? = null
|
||||
}
|
||||
|
||||
enum class SomeEnum {
|
||||
A, B
|
||||
}
|
||||
|
||||
// MODULE: main()()(common)
|
||||
fun Some.test() {
|
||||
if (e == null) return
|
||||
val x = when (<!DEBUG_INFO_SMARTCAST!>e<!>) {
|
||||
SomeEnum.A -> "a"
|
||||
SomeEnum.B -> "B"
|
||||
}
|
||||
}
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
// -- Module: <common> --
|
||||
package
|
||||
|
||||
public final class Some {
|
||||
public constructor Some()
|
||||
public final val e: SomeEnum? = null
|
||||
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 enum class SomeEnum : kotlin.Enum<SomeEnum> {
|
||||
enum entry A
|
||||
|
||||
enum entry B
|
||||
|
||||
private constructor SomeEnum()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: SomeEnum): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<SomeEnum!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): SomeEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<SomeEnum>
|
||||
}
|
||||
|
||||
// -- Module: <main> --
|
||||
package
|
||||
|
||||
public fun Some.test(): kotlin.Unit
|
||||
|
||||
public final class Some {
|
||||
public constructor Some()
|
||||
public final val e: SomeEnum? = null
|
||||
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 enum class SomeEnum : kotlin.Enum<SomeEnum> {
|
||||
enum entry A
|
||||
|
||||
enum entry B
|
||||
|
||||
private constructor SomeEnum()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: SomeEnum): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<SomeEnum!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): SomeEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<SomeEnum>
|
||||
}
|
||||
Reference in New Issue
Block a user