Files
Brian Norman b2041e0927 [FIR] Disable data flow from in-place lambdas
There are many complications with the current design of passing data
from within in-place lambdas to surrounding code. Solving these
complications will involve more time to investigation than is available
within the K2 release. So we are disabling passing type statement
information from lambdas for the time being until more time can be
devoted to a more complete solution.

^KT-60958 Fixed
^KT-63530 Fixed
2023-12-14 16:40:27 +00:00

139 lines
6.6 KiB
Plaintext
Vendored

FILE: flowFromInplaceLambda2.kt
public final fun <T> foo(x: R|T?|, i: R|kotlin/Int|, y: R|T|): R|kotlin/Unit| {
}
public final fun <T> id(x: R|T|): R|T| {
^id R|<local>/x|
}
public final fun <T> n(): R|T?| {
^n Null(null)
}
public final fun someCompletedCall(arg: R|kotlin/Int|): R|kotlin/Int| {
^someCompletedCall R|<local>/arg|
}
public final fun test1(x: R|kotlin/String?|): R|kotlin/Unit| {
R|/foo|<R|kotlin/Int|>(R|/id|<R|kotlin/Int?|>(R|kotlin/run|<R|kotlin/Int?|>(<L> = run@fun <anonymous>(): R|kotlin/Int?| <inline=Inline, kind=EXACTLY_ONCE> {
(R|<local>/x| as R|kotlin/String|)
^ R|/n|<R|kotlin/Int?|>()
}
)), Int(1), R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
^ Int(123)
}
))
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
}
public final fun test2(x: R|kotlin/String?|): R|kotlin/Unit| {
R|/foo|<R|kotlin/Int|>(R|/id|<R|kotlin/Int?|>(R|kotlin/run|<R|kotlin/Int?|>(<L> = run@fun <anonymous>(): R|kotlin/Int?| <inline=Inline, kind=EXACTLY_ONCE> {
(R|<local>/x| as R|kotlin/String|)
^ R|/n|<R|kotlin/Int?|>()
}
)), R|/someCompletedCall|(Int(1)), R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
^ Int(123)
}
))
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
}
public final fun test3(x: R|kotlin/String?|): R|kotlin/Unit| {
R|/foo|<R|kotlin/Int|>(R|/id|<R|kotlin/Int?|>(R|kotlin/run|<R|kotlin/Int?|>(<L> = run@fun <anonymous>(): R|kotlin/Int?| <inline=Inline, kind=EXACTLY_ONCE> {
(R|<local>/x| as R|kotlin/String|)
^ R|/n|<R|kotlin/Int?|>()
}
)), when () {
Boolean(true) -> {
Int(1)
}
else -> {
Int(2)
}
}
, R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
^ Int(123)
}
))
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
}
public final fun test4(x: R|kotlin/String?|): R|kotlin/Unit| {
lvar p: R|kotlin/String?| = R|<local>/x|
when () {
!=(R|<local>/p|, Null(null)) -> {
R|/foo|<R|kotlin/Int|>(R|/id|<R|kotlin/Int?|>(when () {
Boolean(true) -> {
R|kotlin/run|<R|kotlin/Int?|>(<L> = run@fun <anonymous>(): R|kotlin/Int?| <inline=Inline, kind=EXACTLY_ONCE> {
R|<local>/p| = Null(null)
^ R|/n|<R|kotlin/Int?|>()
}
)
}
else -> {
R|kotlin/run|<R|kotlin/Int?|>(<L> = run@fun <anonymous>(): R|kotlin/Int?| <inline=Inline, kind=EXACTLY_ONCE> {
^ R|/n|<R|kotlin/Int?|>()
}
)
}
}
), Int(1), R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
R|<local>/p|.R|kotlin/String.length<Inapplicable(UNSTABLE_SMARTCAST): kotlin/String.length>#|
^ Int(123)
}
))
R|<local>/p|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
}
}
}
public final fun test5(x: R|kotlin/String?|, y: R|kotlin/String?|): R|kotlin/Unit| {
R|/foo|<R|kotlin/String|>(R|<local>/y|?.{ $subj$.R|kotlin/let|<R|kotlin/String|, R|kotlin/String?|>(<L> = let@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String?| <inline=Inline, kind=EXACTLY_ONCE> {
(R|<local>/x| as R|kotlin/String|)
^ R|/n|<R|kotlin/String?|>()
}
) }, Int(1), R|kotlin/run|<R|kotlin/String|>(<L> = run@fun <anonymous>(): R|kotlin/String| <inline=Inline, kind=EXACTLY_ONCE> {
^ String()
}
))
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
}
public final fun test6(x: R|kotlin/String?|): R|kotlin/Unit| {
R|/foo|<R|kotlin/Int|>(R|/id|<R|kotlin/Int?|>(when () {
Boolean(true) -> {
R|kotlin/run|<R|kotlin/Int?|>(<L> = run@fun <anonymous>(): R|kotlin/Int?| <inline=Inline, kind=EXACTLY_ONCE> {
(R|<local>/x| as R|kotlin/String|)
^ R|/n|<R|kotlin/Int?|>()
}
)
}
else -> {
R|kotlin/run|<R|kotlin/Int?|>(<L> = run@fun <anonymous>(): R|kotlin/Int?| <inline=Inline, kind=EXACTLY_ONCE> {
(R|<local>/x| as R|kotlin/String|)
^ R|/n|<R|kotlin/Int?|>()
}
)
}
}
), Int(1), R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
^ Int(123)
}
))
R|<local>/x|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
}
public final fun test7(x: R|kotlin/String?|): R|kotlin/Unit| {
lvar p: R|kotlin/String?| = R|<local>/x|
when () {
!=(R|<local>/p|, Null(null)) -> {
R|/foo|<R|kotlin/Int|>(R|/id|<R|kotlin/Int?|>(R|kotlin/run|<R|kotlin/Int?|>(<L> = run@fun <anonymous>(): R|kotlin/Int?| <inline=Inline, kind=EXACTLY_ONCE> {
R|<local>/p| = Null(null)
^ R|/n|<R|kotlin/Int?|>()
}
)), Int(1), R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
R|<local>/p|.R|kotlin/String.length<Inapplicable(UNSTABLE_SMARTCAST): kotlin/String.length>#|
^ Int(123)
}
))
R|<local>/p|.R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|
}
}
}