[FIR] Don't constraints for return expressions of lambda if it has Unit return type
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
class DropDownComponent<T : Any>(val initialValues: List<T>)
|
||||
|
||||
fun test(strings: List<String>) {
|
||||
val dropDown = DropDownComponent(
|
||||
initialValues = buildList {
|
||||
addAll(strings)
|
||||
}
|
||||
)
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
FILE: builderInferenceAndCoercionToUnit.kt
|
||||
public final class DropDownComponent<T : R|kotlin/Any|> : R|kotlin/Any| {
|
||||
public constructor<T : R|kotlin/Any|>(initialValues: R|kotlin/collections/List<T>|): R|DropDownComponent<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val initialValues: R|kotlin/collections/List<T>| = R|<local>/initialValues|
|
||||
public get(): R|kotlin/collections/List<T>|
|
||||
|
||||
}
|
||||
public final fun test(strings: R|kotlin/collections/List<kotlin/String>|): R|kotlin/Unit| {
|
||||
lval dropDown: R|DropDownComponent<kotlin/String>| = R|/DropDownComponent.DropDownComponent|<R|kotlin/String|>(initialValues = R|kotlin/collections/buildList|<R|kotlin/String|>(<L> = buildList@fun R|kotlin/collections/MutableList<kotlin/String>|.<anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
this@R|special/anonymous|.R|FakeOverride<kotlin/collections/MutableList.addAll: R|kotlin/Boolean|>|(R|<local>/strings|)
|
||||
}
|
||||
))
|
||||
}
|
||||
Reference in New Issue
Block a user