[FIR] Save inline status of lambda after resolution

This commit is contained in:
Dmitriy Novozhilov
2021-03-31 14:58:59 +03:00
committed by TeamCityServer
parent a4b9e2502c
commit 5ebd24eac5
183 changed files with 496 additions and 437 deletions
@@ -1,5 +1,5 @@
FILE: extensionLambdaInDefaultArgument.kt
public final fun test(f: R|kotlin/String.() -> kotlin/Int| = fun R|kotlin/String|.<anonymous>(): R|kotlin/Int| {
public final fun test(f: R|kotlin/String.() -> kotlin/Int| = fun R|kotlin/String|.<anonymous>(): R|kotlin/Int| <inline=Unknown> {
^ this@R|special/anonymous|.R|kotlin/String.length|
}
): R|kotlin/Int| {
@@ -2,7 +2,7 @@ FILE: incorrectFunctionalType.kt
public final fun foo(func: R|kotlin/Int.(kotlin/Int) -> kotlin/Int|): R|kotlin/Unit| {
}
public final fun test(): R|kotlin/Unit| {
R|/foo|(<L> = foo@fun R|kotlin/Int|.<anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
R|/foo|(<L> = foo@fun R|kotlin/Int|.<anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <inline=NoInline> {
^ this@R|special/anonymous|.R|kotlin/Int.plus|(R|<local>/it|)
}
)
@@ -25,29 +25,29 @@ FILE: integerLiteralTypes.kt
<Inapplicable(INAPPLICABLE): /takeByte>#(Int(1000))
}
public final fun test_3(): R|kotlin/Unit| {
R|/takeInt|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
R|/takeInt|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
^ Int(1)
}
))
R|/takeByte|(R|kotlin/run|<R|kotlin/Byte|>(<L> = run@fun <anonymous>(): R|kotlin/Byte| <kind=EXACTLY_ONCE> {
R|/takeByte|(R|kotlin/run|<R|kotlin/Byte|>(<L> = run@fun <anonymous>(): R|kotlin/Byte| <inline=Inline, kind=EXACTLY_ONCE> {
^ Byte(1)
}
))
R|/takeLong|(R|kotlin/run|<R|kotlin/Long|>(<L> = run@fun <anonymous>(): R|kotlin/Long| <kind=EXACTLY_ONCE> {
R|/takeLong|(R|kotlin/run|<R|kotlin/Long|>(<L> = run@fun <anonymous>(): R|kotlin/Long| <inline=Inline, kind=EXACTLY_ONCE> {
^ Long(1)
}
))
}
public final fun test_4(): R|kotlin/Unit| {
R|/takeAny|(Int(1))
R|/takeAny|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
R|/takeAny|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
^ Int(1)
}
))
}
public final fun test_5(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE): /takeString>#(Int(1))
<Inapplicable(INAPPLICABLE): /takeString>#(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
<Inapplicable(INAPPLICABLE): /takeString>#(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
^ Int(1)
}
))
@@ -6,70 +6,70 @@ FILE: lambda.kt
public final fun baz(f: R|() -> kotlin/Unit|, other: R|kotlin/Boolean| = Boolean(true)): R|kotlin/Unit| {
}
public final fun test(): R|kotlin/Unit| {
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| {
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@foo Unit
}
)
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| {
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@foo Unit
}
)
R|/foo|(foo@fun <anonymous>(): R|kotlin/Unit| {
R|/foo|(foo@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@foo Unit
}
)
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /foo>#(Int(1), <L> = foo@fun <anonymous>(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /foo>#(Int(1), <L> = foo@fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^@foo Unit
}
)
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /foo>#(f = foo@fun <anonymous>(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /foo>#(f = foo@fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^@foo Unit
}
, <L> = foo@fun <anonymous>(): R|kotlin/Unit| {
, <L> = foo@fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^@foo Unit
}
)
R|/bar|(Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| {
R|/bar|(Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@bar Unit
}
)
R|/bar|(x = Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| {
R|/bar|(x = Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@bar Unit
}
)
R|/bar|(Int(1), bar@fun <anonymous>(): R|kotlin/Unit| {
R|/bar|(Int(1), bar@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@bar Unit
}
)
R|/bar|(x = Int(1), f = bar@fun <anonymous>(): R|kotlin/Unit| {
R|/bar|(x = Int(1), f = bar@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@bar Unit
}
)
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /bar>#(<L> = bar@fun <anonymous>(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /bar>#(<L> = bar@fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^@bar Unit
}
)
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /bar>#(bar@fun <anonymous>(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /bar>#(bar@fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^@bar Unit
}
)
R|/baz|(other = Boolean(false), f = baz@fun <anonymous>(): R|kotlin/Unit| {
R|/baz|(other = Boolean(false), f = baz@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@baz Unit
}
)
R|/baz|(baz@fun <anonymous>(): R|kotlin/Unit| {
R|/baz|(baz@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
^@baz Unit
}
, Boolean(false))
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /baz>#(<L> = baz@fun <anonymous>(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /baz>#(<L> = baz@fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^@baz Unit
}
)
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /baz>#(<L> = baz@fun <anonymous>(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /baz>#(<L> = baz@fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^@baz Unit
}
)
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /baz>#(other = Boolean(false), <L> = baz@fun <anonymous>(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /baz>#(other = Boolean(false), <L> = baz@fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^@baz Unit
}
)
@@ -24,10 +24,10 @@ FILE: lambdaInLambda.kt
public final fun <U, T : R|Template<U>|> R|U|.insert(template: R|T|, build: R|T.() -> kotlin/Unit|): R|kotlin/Unit| {
}
public final fun test(ordinal: R|kotlin/Int|): R|kotlin/Unit| {
R|/buildString|(<L> = buildString@fun R|StringBuilder|.<anonymous>(): R|kotlin/Unit| {
this@R|special/anonymous|.R|/insert|<R|StringBuilder|, R|KDocTemplate|>(R|/KDocTemplate.KDocTemplate|(), <L> = insert@fun R|KDocTemplate|.<anonymous>(): R|kotlin/Unit| {
this@R|special/anonymous|.R|/KDocTemplate.definition|(<L> = definition@fun R|StringBuilder|.<anonymous>(): R|kotlin/Unit| {
R|<local>/ordinal|?.{ $subj$.R|kotlin/let|<R|kotlin/Int|, R|kotlin/Unit|>(<L> = let@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
R|/buildString|(<L> = buildString@fun R|StringBuilder|.<anonymous>(): R|kotlin/Unit| <inline=NoInline> {
this@R|special/anonymous|.R|/insert|<R|StringBuilder|, R|KDocTemplate|>(R|/KDocTemplate.KDocTemplate|(), <L> = insert@fun R|KDocTemplate|.<anonymous>(): R|kotlin/Unit| <inline=NoInline> {
this@R|special/anonymous|.R|/KDocTemplate.definition|(<L> = definition@fun R|StringBuilder|.<anonymous>(): R|kotlin/Unit| <inline=NoInline> {
R|<local>/ordinal|?.{ $subj$.R|kotlin/let|<R|kotlin/Int|, R|kotlin/Unit|>(<L> = let@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE> {
^@let Unit
}
) }
@@ -7,7 +7,7 @@ FILE: main.kt
public abstract interface PsiClass : R|kotlin/Any| {
}
public final fun test(): R|kotlin/Unit| {
lval processor: R|AdapterProcessor<ft<PsiMethod, PsiMethod?>, ft<PsiClass, PsiClass?>>| = R|/AdapterProcessor.AdapterProcessor|<R|ft<PsiMethod, PsiMethod?>|, R|ft<PsiClass, PsiClass?>|>(R|/Function|<R|ft<PsiMethod, PsiMethod?>|, R|PsiClass?|>(<L> = Function@fun <anonymous>(method: R|PsiMethod?|): R|PsiClass?| {
lval processor: R|AdapterProcessor<ft<PsiMethod, PsiMethod?>, ft<PsiClass, PsiClass?>>| = R|/AdapterProcessor.AdapterProcessor|<R|ft<PsiMethod, PsiMethod?>|, R|ft<PsiClass, PsiClass?>|>(R|/Function|<R|ft<PsiMethod, PsiMethod?>|, R|PsiClass?|>(<L> = Function@fun <anonymous>(method: R|PsiMethod?|): R|PsiClass?| <inline=NoInline> {
^ R|<local>/method|?.{ $subj$.R|/PsiMethod.containingClass| }
}
))
@@ -3,14 +3,14 @@ FILE: lambdaInUnresolvedCall.kt
^materialize Null(null)!!
}
public final fun test_1(): R|kotlin/Unit| {
<Unresolved name: myRun>#(<L> = myRun@fun <anonymous>(): R|kotlin/Int| {
<Unresolved name: myRun>#(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <inline=Unknown> {
lval x: R|kotlin/Int| = Int(1)
^ R|<local>/x|.R|kotlin/Int.times|(Int(2))
}
)
}
public final fun test_2(): R|kotlin/Unit| {
<Unresolved name: myRun>#(<L> = myRun@fun <anonymous>(): R|kotlin/Any?| {
<Unresolved name: myRun>#(<L> = myRun@fun <anonymous>(): R|kotlin/Any?| <inline=Unknown> {
^ R|/materialize|<R|kotlin/Any?|>()
}
)
@@ -52,24 +52,24 @@ FILE: operatorsOverLiterals.kt
<Inapplicable(INAPPLICABLE): /takeByte>#(Int(1).R|kotlin/Int.inv|())
}
public final fun test_6(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE): /takeByte>#(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
<Inapplicable(INAPPLICABLE): /takeByte>#(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
^ Int(127).R|kotlin/Int.plus|(Int(1))
}
))
<Inapplicable(INAPPLICABLE): /takeByte>#(Int(1).R|kotlin/Int.plus|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
<Inapplicable(INAPPLICABLE): /takeByte>#(Int(1).R|kotlin/Int.plus|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
^ Int(1)
}
)))
<Inapplicable(INAPPLICABLE): /takeByte>#(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
<Inapplicable(INAPPLICABLE): /takeByte>#(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
^ Int(1).R|kotlin/Int.plus|(Int(1))
}
))
Int(1).R|kotlin/Int.plus|(Int(1))
R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
^ Int(1)
}
)
Int(1).R|kotlin/Int.plus|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
Int(1).R|kotlin/Int.plus|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
^ Int(1)
}
))
@@ -6,7 +6,7 @@ FILE: overloadWithDefault.kt
}
public final fun test(a: R|A|): R|kotlin/Unit| {
R|<local>/a|.R|/A.foo|(<L> = foo@fun <anonymous>(): R|kotlin/Boolean| {
R|<local>/a|.R|/A.foo|(<L> = foo@fun <anonymous>(): R|kotlin/Boolean| <inline=NoInline> {
^ Boolean(true)
}
)
@@ -5,7 +5,7 @@ FILE: tryInLambda.kt
public final fun foo(): R|kotlin/Unit| {
}
public final fun test(): R|kotlin/Unit| {
R|/myRun|<R|kotlin/Unit|>(<L> = myRun@fun <anonymous>(): R|kotlin/Unit| {
R|/myRun|<R|kotlin/Unit|>(<L> = myRun@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
try {
lval x: R|kotlin/Int| = Int(1)
}
@@ -7,13 +7,13 @@ FILE: untouchedReturnInIf.kt
public final fun leaves(value: R|kotlin/String|, forward: R|kotlin/Boolean|): R|Box<kotlin/String>| {
when () {
R|<local>/forward| -> {
^leaves R|/foo|<R|kotlin/String|>(<L> = foo@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| {
^leaves R|/foo|<R|kotlin/String|>(<L> = foo@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| <inline=NoInline> {
^ String()
}
)
}
else -> {
^leaves R|/foo|<R|kotlin/String|>(<L> = foo@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| {
^leaves R|/foo|<R|kotlin/String|>(<L> = foo@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| <inline=NoInline> {
^ String()
}
)
@@ -2,7 +2,7 @@ FILE: varargOfLambdasWithReceiver.kt
public final fun runLambdas(vararg values: @R|kotlin/ExtensionFunctionType|() R|kotlin/Array<out @ExtensionFunctionType kotlin/Function1<kotlin/String, kotlin/Unit>>|): R|kotlin/Unit| {
}
public final fun test(): R|kotlin/Unit| {
R|/runLambdas|(vararg(runLambdas@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| {
R|/runLambdas|(vararg(runLambdas@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=Unknown> {
this@R|special/anonymous|.R|kotlin/String.length|
}
))