b2041e0927
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
256 lines
13 KiB
Plaintext
Vendored
256 lines
13 KiB
Plaintext
Vendored
FILE: flowFromInplaceLambda.kt
|
|
public final fun <T> unknown(x: R|() -> T|): R|T|
|
|
[R|Contract description]
|
|
<
|
|
CallsInPlace(x, UNKNOWN)
|
|
>
|
|
{
|
|
{
|
|
R|kotlin/contracts/contract|(<L> = contract@fun R|kotlin/contracts/ContractBuilder|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=UNKNOWN> {
|
|
this@R|special/anonymous|.R|kotlin/contracts/ContractBuilder.callsInPlace|<R|T|>(R|<local>/x|, Q|kotlin/contracts/InvocationKind|.R|kotlin/contracts/InvocationKind.UNKNOWN|)
|
|
}
|
|
)
|
|
}
|
|
|
|
^unknown R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()
|
|
}
|
|
public final fun <T> atLeastOnce(x: R|() -> T|): R|T|
|
|
[R|Contract description]
|
|
<
|
|
CallsInPlace(x, AT_LEAST_ONCE)
|
|
>
|
|
{
|
|
{
|
|
R|kotlin/contracts/contract|(<L> = contract@fun R|kotlin/contracts/ContractBuilder|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=UNKNOWN> {
|
|
this@R|special/anonymous|.R|kotlin/contracts/ContractBuilder.callsInPlace|<R|T|>(R|<local>/x|, Q|kotlin/contracts/InvocationKind|.R|kotlin/contracts/InvocationKind.AT_LEAST_ONCE|)
|
|
}
|
|
)
|
|
}
|
|
|
|
^atLeastOnce R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()
|
|
}
|
|
public final fun <T> exactlyOnce(x: R|() -> T|): R|T|
|
|
[R|Contract description]
|
|
<
|
|
CallsInPlace(x, EXACTLY_ONCE)
|
|
>
|
|
{
|
|
{
|
|
R|kotlin/contracts/contract|(<L> = contract@fun R|kotlin/contracts/ContractBuilder|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=UNKNOWN> {
|
|
this@R|special/anonymous|.R|kotlin/contracts/ContractBuilder.callsInPlace|<R|T|>(R|<local>/x|, Q|kotlin/contracts/InvocationKind|.R|kotlin/contracts/InvocationKind.EXACTLY_ONCE|)
|
|
}
|
|
)
|
|
}
|
|
|
|
^exactlyOnce R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()
|
|
}
|
|
public final fun <T> atMostOnce(x: R|() -> T|): R|T|
|
|
[R|Contract description]
|
|
<
|
|
CallsInPlace(x, AT_MOST_ONCE)
|
|
>
|
|
{
|
|
{
|
|
R|kotlin/contracts/contract|(<L> = contract@fun R|kotlin/contracts/ContractBuilder|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=UNKNOWN> {
|
|
this@R|special/anonymous|.R|kotlin/contracts/ContractBuilder.callsInPlace|<R|T|>(R|<local>/x|, Q|kotlin/contracts/InvocationKind|.R|kotlin/contracts/InvocationKind.AT_MOST_ONCE|)
|
|
}
|
|
)
|
|
}
|
|
|
|
^atMostOnce R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()
|
|
}
|
|
public final fun <T> noContract(x: R|() -> T|): R|T| {
|
|
^noContract R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()
|
|
}
|
|
public final fun <K> select(vararg x: R|kotlin/Array<out K>|): R|K| {
|
|
^select R|<local>/x|.R|SubstitutionOverride<kotlin/Array.get: R|CapturedType(out K)|>|(Int(0))
|
|
}
|
|
public final fun <T> id(x: R|T|): R|T| {
|
|
^id R|<local>/x|
|
|
}
|
|
public final fun <K> materialize(): R|K| {
|
|
^materialize Null(null)!!
|
|
}
|
|
public final fun basic(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
|
R|/exactlyOnce|<R|kotlin/Int|>(<L> = exactlyOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=EXACTLY_ONCE> {
|
|
^ (R|<local>/x| as R|kotlin/Int|)
|
|
}
|
|
)
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
}
|
|
public final fun completedCallExactlyOnce(x: R|kotlin/Any?|, y: R|kotlin/Any?|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/exactlyOnce|<R|kotlin/Int|>(<L> = exactlyOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=EXACTLY_ONCE> {
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
^ (R|<local>/x| as R|kotlin/Int|)
|
|
}
|
|
)), (R|<local>/y| as R|kotlin/Int|), R|/exactlyOnce|<R|kotlin/Int|>(<L> = exactlyOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=EXACTLY_ONCE> {
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
}
|
|
public final fun completedCallAtLeastOnce(x: R|kotlin/Any?|, y: R|kotlin/Any?|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/atLeastOnce|<R|kotlin/Int|>(<L> = atLeastOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=AT_LEAST_ONCE> {
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
^ (R|<local>/x| as R|kotlin/Int|)
|
|
}
|
|
)), (R|<local>/y| as R|kotlin/Int|), R|/atLeastOnce|<R|kotlin/Int|>(<L> = atLeastOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=AT_LEAST_ONCE> {
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
}
|
|
public final fun completedCallAtMostOnce(x: R|kotlin/Any?|, y: R|kotlin/Any?|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/atMostOnce|<R|kotlin/Int|>(<L> = atMostOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=AT_MOST_ONCE> {
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
^ (R|<local>/x| as R|kotlin/Int|)
|
|
}
|
|
)), (R|<local>/y| as R|kotlin/Int|), R|/atMostOnce|<R|kotlin/Int|>(<L> = atMostOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=AT_MOST_ONCE> {
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
}
|
|
public final fun completedCallUnknown(x: R|kotlin/Any?|, y: R|kotlin/Any?|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/unknown|<R|kotlin/Int|>(<L> = unknown@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=UNKNOWN> {
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
^ (R|<local>/x| as R|kotlin/Int|)
|
|
}
|
|
)), (R|<local>/y| as R|kotlin/Int|), R|/unknown|<R|kotlin/Int|>(<L> = unknown@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=UNKNOWN> {
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
}
|
|
public final fun completedCallNoContract(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/noContract|<R|kotlin/Int|>(<L> = noContract@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
^ (R|<local>/x| as R|kotlin/Int|)
|
|
}
|
|
)), (R|<local>/y| as R|kotlin/Int|), R|/noContract|<R|kotlin/Int|>(<L> = noContract@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
}
|
|
public final fun incompleteCallExactlyOnce(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/exactlyOnce|<R|kotlin/Int|>(<L> = exactlyOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=EXACTLY_ONCE> {
|
|
(R|<local>/x| as R|kotlin/Int|)
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
R|<local>/x|.R|kotlin/Int.inc|()
|
|
^ R|/materialize|<R|kotlin/Int|>()
|
|
}
|
|
)), R|/exactlyOnce|<R|kotlin/Int|>(<L> = exactlyOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=EXACTLY_ONCE> {
|
|
(R|<local>/y| as R|kotlin/Int|)
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
}
|
|
public final fun incompleteCallAtLeastOnce(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/atLeastOnce|<R|kotlin/Int|>(<L> = atLeastOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=AT_LEAST_ONCE> {
|
|
(R|<local>/x| as R|kotlin/Int|)
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
R|<local>/x|.R|kotlin/Int.inc|()
|
|
^ R|/materialize|<R|kotlin/Int|>()
|
|
}
|
|
)), R|/atLeastOnce|<R|kotlin/Int|>(<L> = atLeastOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=AT_LEAST_ONCE> {
|
|
(R|<local>/y| as R|kotlin/Int|)
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
}
|
|
public final fun incompleteCallAtMostOnce(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/atMostOnce|<R|kotlin/Int|>(<L> = atMostOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=AT_MOST_ONCE> {
|
|
(R|<local>/x| as R|kotlin/Int|)
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
R|<local>/x|.R|kotlin/Int.inc|()
|
|
^ R|/materialize|<R|kotlin/Int|>()
|
|
}
|
|
)), R|/atMostOnce|<R|kotlin/Int|>(<L> = atMostOnce@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=AT_MOST_ONCE> {
|
|
(R|<local>/y| as R|kotlin/Int|)
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
}
|
|
public final fun incompleteCallUnknown(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/unknown|<R|kotlin/Int|>(<L> = unknown@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=UNKNOWN> {
|
|
(R|<local>/x| as R|kotlin/Int|)
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
R|<local>/x|.R|kotlin/Int.inc|()
|
|
^ R|/materialize|<R|kotlin/Int|>()
|
|
}
|
|
)), R|/unknown|<R|kotlin/Int|>(<L> = unknown@fun <anonymous>(): R|kotlin/Int| <inline=NoInline, kind=UNKNOWN> {
|
|
(R|<local>/y| as R|kotlin/Int|)
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
}
|
|
public final fun incompleteCallNoContract(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| {
|
|
R|/select|<R|kotlin/Int|>(vararg(R|/id|<R|kotlin/Int|>(R|/noContract|<R|kotlin/Int|>(<L> = noContract@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
|
|
(R|<local>/x| as R|kotlin/Int|)
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
R|<local>/x|.R|kotlin/Int.inc|()
|
|
^ R|/materialize|<R|kotlin/Int|>()
|
|
}
|
|
)), R|/noContract|<R|kotlin/Int|>(<L> = noContract@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
|
|
(R|<local>/y| as R|kotlin/Int|)
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.R|kotlin/Int.inc|()
|
|
^ Int(1)
|
|
}
|
|
))).R|kotlin/Int.inc|()
|
|
R|<local>/x|.<Unresolved name: inc>#()
|
|
R|<local>/y|.<Unresolved name: inc>#()
|
|
}
|
|
public final fun expectedType(): R|kotlin/Unit| {
|
|
lval x: R|kotlin/Int| = R|/select|<R|kotlin/Int|>(vararg(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
|
^ R|/materialize|<R|kotlin/Int|>()
|
|
}
|
|
), R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
|
^ R|/materialize|<R|kotlin/Int|>()
|
|
}
|
|
)))
|
|
R|<local>/x|.R|kotlin/Int.inc|()
|
|
}
|
|
public final fun expectedTypeNested(): R|kotlin/Unit| {
|
|
lval x: R|kotlin/Int| = R|/id|<R|kotlin/Int|>(R|/noContract|<R|kotlin/Int|>(<L> = noContract@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
|
|
^ R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
|
^ R|/materialize|<R|kotlin/Int|>()
|
|
}
|
|
)
|
|
}
|
|
))
|
|
R|<local>/x|.R|kotlin/Int.inc|()
|
|
}
|