[FIR] Unwrap smartcast on dispatch receiver in CFA for class initialization
^KT-56863 Fixed
This commit is contained in:
committed by
Space Team
parent
bb368bd191
commit
ae07d0e9ce
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
FILE: smartcastOnThisDuringClassInitialization.kt
|
||||
public abstract interface I : R|kotlin/Any| {
|
||||
}
|
||||
public open class Some : R|kotlin/Any| {
|
||||
public constructor(): R|Some| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val x: R|kotlin/Int|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
init {
|
||||
(this@R|/Some| as R|I|)
|
||||
this@R|/Some|.R|/Some.x| = Int(1)
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// ISSUE: KT-56863
|
||||
interface I
|
||||
|
||||
open class Some {
|
||||
val x: Int
|
||||
|
||||
init {
|
||||
this as I
|
||||
x = 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user