FIR: return Unit from empty lambda
This commit is contained in:
@@ -7,70 +7,70 @@ FILE: lambda.kt
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@foo Unit
|
||||
}
|
||||
)
|
||||
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@foo Unit
|
||||
}
|
||||
)
|
||||
R|/foo|(foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@foo Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/foo]>#(Int(1), <L> = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@foo Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/foo]>#(f = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@foo Unit
|
||||
}
|
||||
, <L> = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@foo Unit
|
||||
}
|
||||
)
|
||||
R|/bar|(Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@bar Unit
|
||||
}
|
||||
)
|
||||
R|/bar|(x = Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@bar Unit
|
||||
}
|
||||
)
|
||||
R|/bar|(Int(1), bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@bar Unit
|
||||
}
|
||||
)
|
||||
R|/bar|(x = Int(1), f = bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@bar Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/bar]>#(<L> = bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@bar Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/bar]>#(bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@bar Unit
|
||||
}
|
||||
)
|
||||
R|/baz|(other = Boolean(false), f = baz@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@baz Unit
|
||||
}
|
||||
)
|
||||
R|/baz|(baz@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@baz Unit
|
||||
}
|
||||
, Boolean(false))
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(<L> = baz@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@baz Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(<L> = baz@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@baz Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(other = Boolean(false), <L> = baz@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@baz Unit
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ FILE: lambdaInLambda.kt
|
||||
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|?.R|kotlin/let|<R|kotlin/Int|, R|kotlin/Unit|>(<L> = let@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
Unit
|
||||
^@let Unit
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ FILE: invokeAmbiguity.kt
|
||||
}
|
||||
public final fun box(d: R|D|): R|kotlin/Unit| {
|
||||
R|<local>/d|.R|/attr|.R|/B.invoke|(<L> = attr@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@attr Unit
|
||||
}
|
||||
).R|kotlin/CharSequence.length|
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ FILE: cast.kt
|
||||
|
||||
public get(): R|() -> kotlin/Any|
|
||||
public final val g: R|() -> kotlin/Unit| = fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^ Unit
|
||||
}
|
||||
|
||||
public get(): R|() -> kotlin/Unit|
|
||||
|
||||
@@ -13,5 +13,7 @@ fun main() {
|
||||
|
||||
val f = { "OK" }
|
||||
val ss = f.invoke()
|
||||
|
||||
val empty: () -> Unit = { }
|
||||
}
|
||||
|
||||
|
||||
@@ -33,4 +33,8 @@ FILE: lambda.kt
|
||||
}
|
||||
|
||||
lval ss: R|kotlin/String| = R|<local>/f|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/String|>|()
|
||||
lval empty: R|() -> kotlin/Unit| = fun <anonymous>(): R|kotlin/Unit| {
|
||||
^ Unit
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ FILE: complexLambdaWithTypeVariableAsExpectedType.kt
|
||||
^ R|<local>/it|.R|kotlin/Int.inv|()
|
||||
}
|
||||
), R|/id|<R|(kotlin/Int) -> kotlin/Unit|>(<L> = id@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@id Unit
|
||||
}
|
||||
))
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ FILE: runnable.kt
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/foo|(R|java/lang/Runnable|(<L> = Runnable@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^@Runnable Unit
|
||||
}
|
||||
))
|
||||
}
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@ FILE: invokePriority.kt
|
||||
|
||||
public final fun bar(): R|kotlin/Unit| {
|
||||
lval foo: R|kotlin/String.() -> kotlin/Unit| = fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^ Unit
|
||||
}
|
||||
|
||||
local final fun R|kotlin/String|.foo(): R|kotlin/Unit| {
|
||||
@@ -26,7 +26,7 @@ FILE: invokePriority.kt
|
||||
}
|
||||
|
||||
public final val foo: R|kotlin/String.() -> kotlin/Unit| = fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^ Unit
|
||||
}
|
||||
|
||||
public get(): R|kotlin/String.() -> kotlin/Unit|
|
||||
@@ -65,7 +65,7 @@ FILE: invokePriority.kt
|
||||
}
|
||||
|
||||
public final val f: R|() -> kotlin/Unit| = fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
^ Unit
|
||||
}
|
||||
|
||||
public get(): R|() -> kotlin/Unit|
|
||||
|
||||
Reference in New Issue
Block a user