FIR DFA: add more called-in-place tests

This commit is contained in:
pyos
2022-11-17 00:05:43 +01:00
committed by teamcity
parent f485413cfd
commit 3392e066df
9 changed files with 1928 additions and 639 deletions
@@ -121,3 +121,32 @@ FILE: flowFromTwoInplaceLambdas.kt
R|<local>/p|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
R|<local>/p|?.{ $subj$.R|kotlin/String.length| }
}
public final fun test6(): R|kotlin/Unit| {
lval x: R|kotlin/String|
R|/run2|<R|kotlin/Int|>(run2@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=EXACTLY_ONCE> {
R|<local>/x| = String()
^ R|<local>/x|.R|kotlin/String.length|
}
, run2@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=EXACTLY_ONCE> {
^ R|<local>/x|.R|kotlin/String.length|
}
)
R|<local>/x|.R|kotlin/String.length|
}
public final fun test7(): R|kotlin/Unit| {
lval x: R|kotlin/Any?| = String()
lval y: R|kotlin/Any?|
R|/run2|<R|kotlin/Unit|>(run2@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline, kind=EXACTLY_ONCE> {
R|<local>/y| = R|<local>/x|
}
, run2@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline, kind=EXACTLY_ONCE> {
^@run2 Unit
}
)
when () {
(R|<local>/y| is R|kotlin/String|) -> {
R|<local>/x|.<Unresolved name: length>#
}
}
}