42 lines
1.8 KiB
Plaintext
Vendored
42 lines
1.8 KiB
Plaintext
Vendored
FILE: safeCalls.kt
|
|
public final fun R|kotlin/String|.foo(b: R|kotlin/Boolean|): R|kotlin/String| {
|
|
^foo String()
|
|
}
|
|
public final fun R|kotlin/String|.let(block: R|() -> kotlin/Unit|): R|kotlin/Unit| {
|
|
}
|
|
public final fun test(x: R|kotlin/String?|): R|kotlin/Unit| {
|
|
R|<local>/x|?.{ $subj$.R|/foo|(==(R|<local>/x|.R|kotlin/String.length|, Int(1))) }
|
|
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
|
|
}
|
|
public abstract interface A : R|kotlin/Any| {
|
|
public abstract fun bar(a: R|A|): R|kotlin/String|
|
|
|
|
public abstract fun bool(): R|kotlin/Boolean|
|
|
|
|
public abstract fun id(): R|A|
|
|
|
|
}
|
|
public final fun test_2(x: R|kotlin/Any|): R|kotlin/Unit| {
|
|
(R|<local>/x| as? R|A|)?.{ $subj$.R|/A.bar|(R|<local>/x|) }
|
|
}
|
|
public final fun test_3(x: R|kotlin/Any|): R|kotlin/Unit| {
|
|
(R|<local>/x| as? R|A|)?.{ $subj$.R|/A.bar|(R|<local>/x|) }?.{ $subj$.R|/foo|(R|<local>/x|.R|/A.bool|()) }?.{ $subj$.R|/let|(<L> = let@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
|
|
R|<local>/x|.R|/A.bool|()
|
|
}
|
|
) }
|
|
R|<local>/x|.<Unresolved name: bool>#()
|
|
}
|
|
public final fun test_4(x: R|A?|): R|kotlin/Unit| {
|
|
R|<local>/x|?.{ $subj$.R|/A.id|() }?.{ $subj$.R|/A.bool|() }
|
|
R|<local>/x|.R|/A.id<Inapplicable(UNSAFE_CALL): /A.id>#|()
|
|
}
|
|
public final fun R|kotlin/Any?|.boo(b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
|
}
|
|
public final fun test_5(x: R|A?|): R|kotlin/Unit| {
|
|
R|<local>/x|?.{ $subj$.R|kotlin/let|<R|A|, R|kotlin/Nothing|>(<L> = let@fun <anonymous>(it: R|A|): R|kotlin/Nothing| <inline=Inline, kind=EXACTLY_ONCE> {
|
|
^test_5 Unit
|
|
}
|
|
) }?.{ $subj$.R|/boo|(R|<local>/x|.R|/A.bool|()) }
|
|
R|<local>/x|.R|/A.id<Inapplicable(UNSAFE_CALL): /A.id>#|()
|
|
}
|