Delay ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound to 2.0

#KT-57395 Fixed
Related to KT-47986
This commit is contained in:
Mikhail Glukhikh
2023-03-17 16:01:00 +01:00
committed by Space Team
parent 5ef62c8760
commit a43a16b25b
23 changed files with 191 additions and 38 deletions
@@ -10,10 +10,10 @@ data class InputWrapper<TItem>(val value: TItem)
data class Output(val source: InputWrapper<List<String>>)
fun main2(input: InputWrapper<Unit>): Output {
val output = input.doMapping(
val output = input.<!INFERRED_INTO_DECLARED_UPPER_BOUNDS!>doMapping<!>(
foo = { buildList { add("this is List<String>") } },
<!BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION!>bar = { it.isNotEmpty() }<!>,
)
return Output(source = output)
return Output(source = <!TYPE_MISMATCH!>output<!>)
}