e6b5cb5216
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
73 lines
2.0 KiB
Plaintext
Vendored
73 lines
2.0 KiB
Plaintext
Vendored
FILE: assignSafeCall.kt
|
|
public final class A : R|kotlin/Any| {
|
|
public constructor(): R|A| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public final fun foo(): R|kotlin/Int| {
|
|
^foo Int(1)
|
|
}
|
|
|
|
public final val x: R|kotlin/Int| = Int(1)
|
|
public get(): R|kotlin/Int|
|
|
|
|
public final fun bar(): R|kotlin/Unit| {
|
|
}
|
|
|
|
}
|
|
public final fun test_1(a: R|A?|): R|kotlin/Unit| {
|
|
lval x: R|kotlin/Int?| = R|<local>/a|?.{ $subj$.R|/A.x| }
|
|
when () {
|
|
!=(R|<local>/x|, Null(null)) -> {
|
|
R|<local>/a|.R|/A.bar|()
|
|
}
|
|
}
|
|
|
|
}
|
|
public final fun test_2(a: R|A?|): R|kotlin/Unit| {
|
|
lval x: R|kotlin/Int?| = R|<local>/a|?.{ $subj$.R|/A.foo|() }
|
|
when () {
|
|
!=(R|<local>/x|, Null(null)) -> {
|
|
R|<local>/a|.R|/A.bar|()
|
|
}
|
|
}
|
|
|
|
}
|
|
public final fun test_3(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
|
lval a: R|A| = (R|<local>/x| as? R|A|) ?: ^test_3 Unit
|
|
R|<local>/a|.R|/A.foo|()
|
|
R|<local>/x|.R|/A.foo|()
|
|
}
|
|
public abstract interface B : R|kotlin/Any| {
|
|
public abstract fun foo(): R|kotlin/Int|
|
|
|
|
public abstract val x: R|kotlin/Int|
|
|
public get(): R|kotlin/Int|
|
|
|
|
public abstract fun bar(): R|kotlin/Unit|
|
|
|
|
}
|
|
public final fun test_1(a: R|B?|): R|kotlin/Unit| {
|
|
lval x: R|kotlin/Int?| = R|<local>/a|?.{ $subj$.R|/B.x| }
|
|
when () {
|
|
!=(R|<local>/x|, Null(null)) -> {
|
|
R|<local>/a|.R|/B.bar|()
|
|
}
|
|
}
|
|
|
|
}
|
|
public final fun test_2(a: R|B?|): R|kotlin/Unit| {
|
|
lval x: R|kotlin/Int?| = R|<local>/a|?.{ $subj$.R|/B.foo|() }
|
|
when () {
|
|
!=(R|<local>/x|, Null(null)) -> {
|
|
R|<local>/a|.R|/B.bar|()
|
|
}
|
|
}
|
|
|
|
}
|
|
public final fun test_3(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
|
lval a: R|B| = (R|<local>/x| as? R|B|) ?: ^test_3 Unit
|
|
R|<local>/a|.R|/B.foo|()
|
|
R|<local>/x|.R|/B.foo|()
|
|
}
|