[FIR] implicit type: avoid redundant property and function transformations

This is a contract violation – we can touch only bodies during this phase

^KT-56551
This commit is contained in:
Dmitrii Gridin
2023-09-21 18:07:19 +02:00
committed by Space Team
parent ddc4fac896
commit f124ba627d
42 changed files with 359 additions and 318 deletions
@@ -1,5 +1,11 @@
BEFORE MODIFICATION:
public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] arg: R|kotlin/Any?|, [ResolvedTo(BODY_RESOLVE)] num: R|kotlin/Int?|, [ResolvedTo(BODY_RESOLVE)] block: R|() -> kotlin/Unit|): R|kotlin/Unit| {
public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] arg: R|kotlin/Any?|, [ResolvedTo(BODY_RESOLVE)] num: R|kotlin/Int?|, [ResolvedTo(BODY_RESOLVE)] block: R|() -> kotlin/Unit|): R|kotlin/Unit|
[Contract description] <
<Unresolved name: returns>#().<Unresolved name: implies>#((R|<local>/arg| is R|kotlin/String|)),
<Unresolved name: returns>#().<Unresolved name: implies>#(!=(R|<local>/num|, Null(null))),
<Unresolved name: callsInPlace>#(R|<local>/block|, <Unresolved name: InvocationKind>#.<Unresolved name: EXACTLY_ONCE>#)
>
{
<Unresolved name: require>#((R|<local>/arg| is R|kotlin/String|))
<Unresolved name: require>#(!=(R|<local>/num|, Null(null)))
R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()